[17912] in Perl-Users-Digest
Perl-Users Digest, Issue: 72 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jan 16 18:05:46 2001
Date: Tue, 16 Jan 2001 15:05:14 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <979686314-v10-i72@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 16 Jan 2001 Volume: 10 Number: 72
Today's topics:
Re: aix suid perl problem (Garry Williams)
An ascii progress bar! richardstands@my-deja.com
ANNOUNCE: Spreadsheet::WriteExcel 0.24 (John McNamara)
bidirectional communication using sockets mmustafa@my-deja.com
Re: bidirectional communication using sockets <johngros.NOSPAM@bigpond.net.au>
Re: Fetching server's hard-disk with Perl dtbaker_dejanews@my-deja.com
Re: Fork lots of children <mischief@velma.motion.net>
Re: How to convert a double-spaced file to single space (Colin Watson)
Re: How to convert a double-spaced file to single space (Abigail)
Re: How to convert a double-spaced file to single space <stephenk@cc.gatech.edu>
How to Create a Perl Shared Library (.so file) ? hmug@my-deja.com
Re: Insert value into table using perl/DBI <jing@research.att.com>
Re: Insert value into table using perl/DBI (Garry Williams)
Re: Installing Module (Abigail)
Maximum array size? <eric.kort@vai.org>
Re: Maximum array size? <johngros.NOSPAM@bigpond.net.au>
Re: Maximum array size? (Garry Williams)
Re: More questions about pattern matching (Tad McClellan)
Re: More questions about pattern matching pyro3k@my-deja.com
Re: Newbie question: hash tables and dbm files; what am (Garry Williams)
Re: Newbie question: hash tables and dbm files; what am gnari@my-deja.com
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 16 Jan 2001 20:41:34 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: aix suid perl problem
Message-Id: <2m296.42$h41.2755@eagle.america.net>
On Tue, 16 Jan 2001 08:19:30 -0600, Phil R Lawrence
<prlawrence@lehigh.edu> wrote:
>After reading perldoc perlsec, I made a perl script and had our sysadmin
>chown, chgrp, and chmod it appropriately (?).
>
>When I run it, however, $> remains the same as $<.
>
>Details:
>-rwsr-x--- 2 owner group 7171 Jan 15 16:10 file_name.pl
...
>Any ideas on what is wrong?
Nope, but here's actual code and actual results from another OS
environment:
$ uname -a
SunOS zweb 5.7 Generic_106541-11 sun4u sparc SUNW,Ultra-60
$ cat x
#!/usr/local/bin/perl -T
use strict;
use warnings;
print "TEST: real user - $<\n";
print "TEST: eff user - $>\n";
$ sudo chown nobody x
Password:
$ sudo chmod u+xs,go+x x
$ ./x
TEST: real user - 100
TEST: eff user - 60001
$
--
Garry Williams
------------------------------
Date: Tue, 16 Jan 2001 21:26:52 GMT
From: richardstands@my-deja.com
Subject: An ascii progress bar!
Message-Id: <942eah$d93$1@nnrp1.deja.com>
Hiya,
Someone had a post a few months back about an ascii progress bar/meter
for downloads and uploads. The solutions provided helped me create a
little class file to do something similar. I would normally just use
the Tk::ProgressIndicator class and windows but some of my perl is
called by old and creaky dos apps :o( Anyway here it be:
#!perl -w
package AsciiProgressBar;
use strict;
sub new {
my $class = shift;
croak( 'method "new" missing argument' ) unless ( $_[0] );
my %args = %{ $_[0] };
# object data
my $self = {};
$class = ref( $class ) || $class;
bless( $self, $class );
# these args must be present
$self->{ max_amount } = $args{ max_amount } || croak( 'method "new"
missing argument "max_amount"' );
# init obj data with args or defaults
$self->{ filled_block_char } = $args{ filled_block_char } || chr
(219);
$self->{ unfilled_block_char } = $args{ unfilled_block_char } || chr
(178);
$self->{ check_frequency } = $args{ check_frequency } || 1;
$self->{ percent_done } = 0;
$self->{ last_percent } = 0;
$self->{ current_amount } = 0;
return( $self );
}
sub refresh {
my $self = shift;
$self->{ current_amount } = shift;
unless ( defined $self->{ current_amount } and $self->{
current_amount } >= 0 ) {
croak( 'method "refresh" missing / invalid argument' );
}
# round the percentage down to the nearest frequency increment
$self->{ percent_done } = $self->{ check_frequency } * int( ( (
$self->{ current_amount } * 100 ) / $self->{ max_amount } ) / $self->{
check_frequency } );
if ( $self->{ percent_done } > $self->{ last_percent } ) {
print "\r", sprintf( "%3s", int $self->{ percent_done } ), "%
done: ", $self->{ filled_block_char } x int( $self->{ percent_done } /
2 ), $self->{ unfilled_block_char } x ( 50 - int( $self->{
percent_done } / 2 ) );
$self->{ last_percent } = $self->{ percent_done };
}
}
1;
-Rich
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Sun, 14 Jan 2001 23:38:05 GMT
From: jmcnamara@cpan.org (John McNamara)
Subject: ANNOUNCE: Spreadsheet::WriteExcel 0.24
Message-Id: <t69gavhejoqm1b@corp.supernews.com>
ANNOUNCE
Spreadsheet::WriteExcel version 0.24 has been uploaded to CPAN.
NAME
Spreadsheet::WriteExcel - Write formatted text and numbers to a
cross-platform Excel binary file.
CHANGES
Minor.
Added write_url method.
Added set_merge() alias for set_align('merge') method.
Added warnings about deprected code when running under -w flag.
Documentation changes.
DESCRIPTION
This module can be used to write numbers and text in the native
Excel binary file format. Multiple worksheets can be added to a
workbook. Formatting can be applied to cells.
The Excel file produced by this module is compatible with Excel 5,
95, 97 and 2000.
The module will work on the majority of Windows, UNIX and
Macintosh platforms. Generated files are also compatible with the
Linux/UNIX spreadsheet applications Star Office, Gnumeric and
XESS. The generated files are not compatible with MS Access.
This module cannot be used to read an Excel file. See
Spreadsheet::ParseExcel or look at the main documentation for some
suggestions.
INSTALLATION
Download the zipped tar file from:
http://search.cpan.org/search?dist=Spreadsheet-WriteExcel
Unzip the module as follows or use winzip:
tar -zxvf Spreadsheet-WriteExcel-0.24.tar.gz
The module can be installed using the standard Perl procedure:
perl Makefile.PL
make
make test
make install # You may need to be root
make clean # or make realclean
Windows users without a working "make" can get nmake from:
ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe
ActivePerl users can use PPM as follows:
C:\> ppm
PPM> set repository tmp http://homepage.eircom.net/~jmcnamara/perl
PPM> install Spreadsheet-WriteExcel
PPM> quit
C:\>
NOTE: Version 0.23 changed the WriteExcel namespace. To tidy up
stray files it would be best to uninstall any older versions older
than this prior to installation.
VERSION
This document refers to version 0.24 of Spreadsheet::WriteExcel,
released Jan 14, 2001.
AUTHOR
John McNamara (jmcnamara@cpan.org)
--
And the eighth and final rule, if this is your first time using Perl,
you will have to write code.
------------------------------
Date: Tue, 16 Jan 2001 20:38:51 GMT
From: mmustafa@my-deja.com
Subject: bidirectional communication using sockets
Message-Id: <942bgq$aj5$1@nnrp1.deja.com>
Hi,
I am trying to write a PERL program using sockets. One side ( which
we call client ) is communicating with the listener ( which we call
server) thru a specific port. This is working fine.
The problem i am running into is after sending a couple of strings
(haven't been able to pass an array), the listener/ server reads it,
and does some processing. But if the listener wants to send some
response back to the client, the client can't read it. I will give a
brief code summnary here ( rather then the whole thing ) , this didn't
work :
CLIENT CODE :
#socket initializination, $port and $server are arguments
socket(SOCKET, PF_INET, SOCK_STREAM, (getprotobyname('tcp'))[2]);
connect (SOCKET, pack('Sna4x8', AF_INET, $port,
(gethostbyname($server))[4]))
|| die "Can't connect to server $server on port $port .\n";
SOCKET->autoflush();
print SOCKET "Command1 \r\n";
print SOCKET "Command2 \r\n";
# I need to read response from the server :
# did NOT WORK
# shutdown(SOCKET,1);
# while (<SOCKET>) {
# while (defined ($string = <SOCKET>) ) {
recv(SOCKET,$string,100,0);
if ($string) {
$string = $_;
print "STRING : ****($string)****\n";
if ($string == 1) {
I tried threading the process , which created further problems ( maybe
programing error).
I tried shutdown , which also on the server side, so that the client
doesn't keep on waiting ( according to the documentation , recv will
keep on waiting).
Here is a snippet of SERVER CODE :
$server = IO::Socket::INET->new( Proto => 'tcp',
LocalPort => $DEFAULT_PORT,
Listen => SOMAXCONN,
Reuse => 1);
while(<$server>)
{
chomp($_);
print "Value of i = $i and this is what I got
from the other machine: **($_)** \n";
autoflush $server 5;
$i++;
if ($i == 1) {
$input = $_ ;
chomp($input);
print "\tRELEASE OR DROP = ($input) \n";
}
If anyone knows how to do it... please post something....
I apologise if the message is cryptic or vague, I would love to explain
further if anyone has interest to help.
Thanks a lot in advance
Farooq
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Tue, 16 Jan 2001 22:57:52 GMT
From: "John Boy Walton" <johngros.NOSPAM@bigpond.net.au>
Subject: Re: bidirectional communication using sockets
Message-Id: <Ql496.65801$xW4.515904@news-server.bigpond.net.au>
<mmustafa@my-deja.com> wrote in message news:942bgq$aj5$1@nnrp1.deja.com...
> Hi,
> I am trying to write a PERL program using sockets. One side ( which
> we call client ) is communicating with the listener ( which we call
> server)
The server serves and the client 'listens', you have them around the wrong
way.
------------------------------
Date: Tue, 16 Jan 2001 21:48:20 GMT
From: dtbaker_dejanews@my-deja.com
Subject: Re: Fetching server's hard-disk with Perl
Message-Id: <942fj0$edm$1@nnrp1.deja.com>
In article <3a64681f.17002689@news.tin.it>,
-nancy-@libero.it wrote:
> Hi
>
> I'm trying to write a perl script
> who indexes the content of a web server's hard disk
> simply by typing an URL.
>
> The script has to list all the files on the server's hard disk
> on which that URL is hosted.
-------------
you can fetch any files in the areas you have permissions to read; which
is usually just the public_html area or some other public areas reserved
for ftp and the like...
D
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Tue, 16 Jan 2001 20:27:35 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Fork lots of children
Message-Id: <t69blnfm41dada@corp.supernews.com>
Collin Starkweather <collin.starkweather@collinstarkweather.com> wrote:
> Bill Buchan wrote:
>>
>> I'd like to run a number of processes at the same time (unix).
fork() should work, unless you need threading support instead.
>> I've been using fork but I seem to have to create a child process, then
>> spawn a child from the child, and a child from this child etc. until I
>> have a whole heirarchy of children. This works but the code is a real
>> mess.
So your code must look something like this:
my $pid = fork();
$pid = fork();
$pid = fork();
The secret to doing most anything a number of times in a sequential
programming language ( including forking processes so you don't
have to do everything in sequence after all ) is to use a loop. A
fairly simple example of how to handle multiple children is below.
This is slightly different from what's in _Perl_Cookbook_, and I
don't claim that mine's better. It is cheaper than buying a book
for one example, though. I'd still recommend the Ram, as it is a
good source of other examples as well.
My apologies for keeping the copyright notice and the license
in the example when posting to the group. It might be tacky,
but, "once released, a copyrighted work must always bear the
notice" and yadda yadda yadda... This is a section of a much
larger program, slightly mutated to be a simple example.
###-------------------------------------------------------------
#!/usr/bin/perl -w
# Quints
# example of multiple children from one parent by Chris Stith
# Copyright 2000, 2001 Christopher E. Stith
# You may use this source code in another program or base another
# program entirely on this source code, alter this source code
# as you see fit, and you may copyright the program which makes
# use of or is derived from this code. The original author maintains
# copyright on this source code as it is. Any copyright notice for
# a program making use of this source code, or derived from it,
# should note that portions are copyrighted by Christopher E. Stith
# and that these sections are used with permission.
# NOTE: many of the `sections' described in the comments could
# be turned into a single subroutine call inside the control
# use strict is always a good idea.
# It is usually a very good idea.
use strict;
# This section sets up the children.
my $children_to_spawn = 5; # number of children we want to spawn
my $num_children = 0; # number we have now
my $im_the_parent = 1; # is this process the parent?
my @kid_pid = (); # array of child PIDs
for(my $i = 0; $i < $children_to_spawn; $i++ ) {
if( my $p = fork() ) {
# Only the parent does this.
push( @kid_pid, $p ); # add to the array of child PIDs
$num_children = $i + 1; # The loop starts at 0, so add 1 here
# (or, we could have started the loop
# at 1, used <= instead of <, not
# added anything here, and been more
# efficient but slightly less clear.
} else {
# Only the child does this.
$im_the_parent = 0; # We only want the original process
# to perform any actions meant for
# the parent.
last; # We want out of the loop so we don't also spawn
# children within the loop.
}
}
# This section is for any initialization or preprocessing
# peculiar to the parent or its children. Also, if the
# parent shouldn't do any real processing and should
# just wait for the children, you can put your main processing
# section within the child section (the else clause) of this
# if.
if( $im_the_parent ) {
# Only the parent does this, because we cleared
# $im_the_parent in the child section of the loop.
my $kids = join( ', ', @kid_pid );
print "I'm the parent. My pid is $$, and I have spawned $kids.\n";
} else {
# Only the children do this.
print "I'm a child. My pid is $$.\n"
}
# You can do main processing here to make sure the parent and
# all children do the same thing.
#
# Everything does this because there's no check on which process
# is running.
# It's probably not a good idea to put an infinite loop or
# something similar in this section, since that would tie the
# parent up as well as the children. I always prefer to have my
# parent shortly available to wait on the children. If you really
# want to make the main part of the children into an infinite loop
# or use deep recursion, it might be best to make this section
# test for which process is running just like the above and below
# sections.
#
# If there's nothing we want the parent AND its children to do,
# we can leave this section empty.
print "$$ says: We can all do the same thing now.\n\n";
# Cleanup section!
# This is a good place to wait for your children. I wouldn't
# do much else inside the while() loop in this section,
# because wait is, by nature, asynchronous (we don't want to
# use waitpid() with &WNOHANG here, because we're in a loop
# and we want to be nice to the system). Code that the
# parent should run might go in the if() block here but
# outside the while() loop. If you want to be sure the
# parent has no children left before it does its final
# cleanup, put such code after the while() loop.
if( $im_the_parent ) {
# Only the parent does this, because we cleared
# $im_the_parent in the child section of the loop.
while( $num_children ) {
my $dead_child = wait;
print "I just reaped $dead_child.\n";
$num_children--;
}
# parent cleanup section!
# This is where the parent can do anything we want it
# to do after the children are all dead.
print "$$: Alas, I've no children left!\n";
} else {
# child cleanup section!
# This is where the child can perform any last actions
# that the parent need not do as well.
print "$$: My service to my parent is done.\n";
}
exit(0);
###----------------------------------------------------------
>> All I want is one parent and multiple children all at the same level in
>> the process heirarchy. Is this possible? Or is there a better way to
>> go about it - ie. other than fork? Or does somebody have a tidier bit
>> of code to do this!?
I haven't seen the OP's code, so I can't be sure that mine is much
tidier. Mine is tested, though, and it does what the OP asks.
IIRC, my code above is commented more thoroughly than the example
in the Ram. It'd probably be best to get the Ram ( _Perl_Cookbook_ ),
and compare and contrast two different sources of code which both
deal with the same issue. I've never been asked to write a book
on Perl, so I wouldn't be offended to hear "The Ram does it better"
or similar comments from the OP or anyone else.
>> Many thanks for any information
I hope this helps. Of course, you'd never write multiple forks
into a production program just to print out a couple dozen strings.
;)
> You'll find what you need in the Perl Cookbook.
Indeed. I hate telling someone to buy a book for one example. The
Ram is handy, though, so I wouldn't tell someone not to buy it.
Chris
--
Christopher E. Stith
"Get real! This is a discussion group, not a helpdesk. You post
something, we discuss its implications. If the discussion happens to
answer a question you've asked, that's incidental." -- nobull in clp.misc
------------------------------
Date: 16 Jan 2001 19:18:23 GMT
From: cjw44@flatline.org.uk (Colin Watson)
Subject: Re: How to convert a double-spaced file to single spaced?
Message-Id: <9426pv$ssq$1@riva.ucam.org>
Terrence Brannon <brannon@lnc.usc.edu> wrote:
>How can I do this as a Perl one-liner? I get very confused when I try
>to understand the -n -p -l -e options of perl, but I am sure I can do
>this in one line if I could figure them out.
Either of these, depending on which way round your spacing is:
perl -ne 'print if $i = !$i'
perl -ne 'print unless $i = !$i'
--
Colin Watson [cjw44@flatline.org.uk]
"People frequently expect it to work like this. So it does."
- perlref(1p) man page
------------------------------
Date: 16 Jan 2001 20:32:09 GMT
From: abigail@foad.org (Abigail)
Subject: Re: How to convert a double-spaced file to single spaced?
Message-Id: <slrn969bu9.tp2.abigail@tsathoggua.rlyeh.net>
Colin Watson (cjw44@flatline.org.uk) wrote on MMDCXCV September MCMXCIII
in <URL:news:9426pv$ssq$1@riva.ucam.org>:
__ Terrence Brannon <brannon@lnc.usc.edu> wrote:
__ >How can I do this as a Perl one-liner? I get very confused when I try
__ >to understand the -n -p -l -e options of perl, but I am sure I can do
__ >this in one line if I could figure them out.
__
__ Either of these, depending on which way round your spacing is:
__
__ perl -ne 'print if $i = !$i'
__ perl -ne 'print unless $i = !$i'
__
Or just:
$ perl -lp00e0 in > out
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: Tue, 16 Jan 2001 16:51:20 -0500
From: Stephen Kloder <stephenk@cc.gatech.edu>
Subject: Re: How to convert a double-spaced file to single spaced?
Message-Id: <3A64C258.EC14E142@cc.gatech.edu>
Colin Watson wrote:
> Terrence Brannon <brannon@lnc.usc.edu> wrote:
> >How can I do this as a Perl one-liner? I get very confused when I try
> >to understand the -n -p -l -e options of perl, but I am sure I can do
> >this in one line if I could figure them out.
>
> Either of these, depending on which way round your spacing is:
>
> perl -ne 'print if $i = !$i'
> perl -ne 'print unless $i = !$i'
>
Slightly shorter and cleverer:
perl -pe '$_ x=$.%2'
perl -pe '$_ x=!($.%2)'
--
Stephen Kloder | "I say what it occurs to me to say.
stephenk@cc.gatech.edu | More I cannot say."
Phone 404-874-6584 | -- The Man in the Shack
ICQ #65153895 | be :- think.
------------------------------
Date: Tue, 16 Jan 2001 19:01:23 GMT
From: hmug@my-deja.com
Subject: How to Create a Perl Shared Library (.so file) ?
Message-Id: <9425pr$4vq$1@nnrp1.deja.com>
Hi
I would like to create a shared library (.so file) from a prel script
which I would like to use inn my PL/SQL procedure.
Can someone educate me on how I can go about creating the .so file
given the perl script. Do I need to add anything in the perl script to
make creation of the shared library feasible?
Your help is highly appreciated.
Henry
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Tue, 16 Jan 2001 20:20:52 GMT
From: Jing Zhou <jing@research.att.com>
Subject: Re: Insert value into table using perl/DBI
Message-Id: <3A64AD24.9FA42629@research.att.com>
Here is the sample code, I didn't use the (?) placeholder in the SQL
statement.
use DBI;
### perform the database connection
my $dbh = DBI->connect ( "dbi:ODBC:snrdb2", "", "" ) or die "Can't connect to
database";
### Open the macaddress dump file, die upon failure
#### Declare our row filed variables
### $MacAddress $HostName $IPAddress $SwitchBoardPort $LastSeen
open (INPUT, "c:/stage1/Mctest3.txt") || die "cannot open Mctest file for
reading";
chomp($x = <INPUT>);
while ($x ne "") {
($MacAddress,$HostName,$IPAddress,$SwitchBoardPort,$LastSeen)
= split(" ",$x);
my $sth = $dbh->prepare( "INSERT INTO IDFSwitch VALUES
($MacAddress,$HostName,$IPAddress,$SwitchBoardPort,$LastSeen)");
$sth->execute();
chomp($x = <INPUT>);
}
close(INPUT);
#### disconnect from the database
$dbh->disconnect || warn $dbh-errstr;
exit;
Kurt Stephens wrote:
> "Jing Zhou" <jing@research.att.com> wrote in message
> news:3A6358C9.7A4B22D0@research.att.com...
> > I have been trying to populate a table in my database using perl/DBI , I
> > was able to establish the connection to the database, it failed to do
> > the insert. The error message was :
> > Can't mix placeholder styles (1/2) at c:/perl/site/lib/DBD/ODBC.pm.
> >
> > Any suggestions?
>
> Please post a copy of the code that causes the error. It looks like you
> have a problem with the (?) placeholders in your SQL statement.
>
> Kurt Stephens
------------------------------
Date: Tue, 16 Jan 2001 21:53:58 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: Insert value into table using perl/DBI
Message-Id: <Wp396.56$h41.2118@eagle.america.net>
On Tue, 16 Jan 2001 20:20:52 GMT, Jing Zhou <jing@research.att.com> wrote:
>Here is the sample code, I didn't use the (?) placeholder in the SQL
>statement.
>
>use DBI;
>
>### perform the database connection
>
>my $dbh = DBI->connect ( "dbi:ODBC:snrdb2", "", "" ) or die "Can't connect to
>database";
>
>
>### Open the macaddress dump file, die upon failure
>
>
>#### Declare our row filed variables
>### $MacAddress $HostName $IPAddress $SwitchBoardPort $LastSeen
>
>open (INPUT, "c:/stage1/Mctest3.txt") || die "cannot open Mctest file for
>reading";
>
> chomp($x = <INPUT>);
> while ($x ne "") {
> ($MacAddress,$HostName,$IPAddress,$SwitchBoardPort,$LastSeen)
> = split(" ",$x);
>
> my $sth = $dbh->prepare( "INSERT INTO IDFSwitch VALUES
>
>($MacAddress,$HostName,$IPAddress,$SwitchBoardPort,$LastSeen)");
Well, it would have been nice to see at least one example line in your
input stream, but let me guess at what it might look like:
08:00:20:cf:e6:b3 xyz 1.2.3.4 55 4/7/2000
Now, the actual string that you are asking the database to prepare
looks like this:
INSERT INTO IDFSwitch VALUES
(08:00:20:cf:e6:b3,xyz,1.2.3.4,55,4/7/2000)
This is an invalid syntax in any SQL-based database I've ever worked
with.
You need to properly quote the values in the SQL query.
See the quote() database handle method in the DBI manual page.
--
Garry Williams
------------------------------
Date: 16 Jan 2001 20:33:02 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Installing Module
Message-Id: <slrn969bvu.tp2.abigail@tsathoggua.rlyeh.net>
Bernard El-Hagin (bernard.el-hagin@lido-tech.net) wrote on MMDCXCV
September MCMXCIII in <URL:news:slrn968ma8.2q0.bernard.el-hagin@gdndev25.lido-tech>:
,, On Tue, 16 Jan 2001 14:19:18 GMT, Waarddebon <Waarddebon@chello.nl> wrote:
,, >Can anyone tell me how I can install modules on hypermart ?
,,
,, What's a "hypermart"?
,,
It's a big place where you buy groceries, but that's not important right now.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
------------------------------
Date: Tue, 16 Jan 2001 15:40:20 -0500
From: "Eric" <eric.kort@vai.org>
Subject: Maximum array size?
Message-Id: <942ba9$2mfp$1@msunews.cl.msu.edu>
I am pushing data onto an array from an image. When I get to about 4MB of
data pushed, the script freezes, despite the fact that more memory is
available.
Why is that?
Eric
------------------------------
Date: Tue, 16 Jan 2001 21:45:18 GMT
From: "John Boy Walton" <johngros.NOSPAM@bigpond.net.au>
Subject: Re: Maximum array size?
Message-Id: <Oh396.65686$xW4.515549@news-server.bigpond.net.au>
"Eric" <eric.kort@vai.org> wrote in message
news:942ba9$2mfp$1@msunews.cl.msu.edu...
> I am pushing data onto an array from an image. When I get to about 4MB of
> data pushed, the script freezes, despite the fact that more memory is
> available.
There is no maximum array size.
An example of the code would help people find the problem. Make sure you are
using strict and warnings first though. You will get a better reception.
------------------------------
Date: Tue, 16 Jan 2001 21:54:51 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: Maximum array size?
Message-Id: <Lq396.57$h41.2118@eagle.america.net>
On Tue, 16 Jan 2001 15:40:20 -0500, Eric <eric.kort@vai.org> wrote:
>I am pushing data onto an array from an image. When I get to about 4MB of
>data pushed, the script freezes, despite the fact that more memory is
>available.
>
>Why is that?
Looks like line 42 is at fault.
--
Garry Williams
------------------------------
Date: Tue, 16 Jan 2001 15:30:11 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: More questions about pattern matching
Message-Id: <slrn969bqj.12p.tadmc@tadmc26.august.net>
mintcake@my-deja.com <mintcake@my-deja.com> wrote:
>In article <940r4m$s87$1@brokaw.wa.com>,
> "Mike McPherson" <hafateltec@hotmail.com> wrote:
>> unless ($validip =~
>> /^[0-2][0-5]{2}.[0-2][0-5]{2}.[0-2][0-5]{2}.[0-2][0-5]{2}/) {
>> will not validate 249.249.249.249 ::
>
>Is it because you're trying to match dots with dots.
No it isn't (but that is yet another problem with the pattern,
probably one that the OP has not even noticed yet).
> A . matches any
>character in a regexp - you need \.
After making that change, it _still_ will not validate 249.249.249.249.
Can you see why?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Tue, 16 Jan 2001 22:40:05 GMT
From: pyro3k@my-deja.com
Subject: Re: More questions about pattern matching
Message-Id: <942ik4$h4c$1@nnrp1.deja.com>
Thank you to everybody who posted help and suggestions. Sorry about
the indentation problem. Microsloth, what can I say.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Tue, 16 Jan 2001 20:51:09 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: Newbie question: hash tables and dbm files; what am I doing wrong?
Message-Id: <1v296.45$h41.2755@eagle.america.net>
On Tue, 16 Jan 2001 02:41:20 -0500, James Kauzlarich
<nospam-abuse@[127.0.0.1]> wrote:
>One last mystery, if you please, even through I've told it to make the db
>files -rw-rw-rw- with a 0666, I've been getting -rw-rw-r--, though they seem
>to work fine (for now, from a command line). What's going on?
See the umask section of the perlfunc manual page.
--
Garry Williams
------------------------------
Date: Tue, 16 Jan 2001 21:35:54 GMT
From: gnari@my-deja.com
Subject: Re: Newbie question: hash tables and dbm files; what am I doing wrong?
Message-Id: <942erp$dpm$1@nnrp1.deja.com>
In article <941ksn$kps$1@nnrp1.deja.com>,
Brian <brosson@my-deja.com> wrote:
> I've had the same experience, it's frustrating. I finally read that
> you can't save hashes of hashes in a dbm file. It was very difficult
> to locate any reference material that addresses this.
>
really? this is too much!
perldoc -q DBM
if you dont know how to use perldoc, try
perldoc perldoc
and then why not
perldoc perl
if perldoc is not installed on your system, do not despair. try
man perlfaq
and search for DBM
if man pages are too much, then look in this newsgroup for the regular
FAQ postings. any one of them contains links to online docs
a quick search on deja.com for 'FAQ DBM' actually locates this very FAQ
and an excellent reply by Garry Williams to a similar posting less than
3 weeks ago
if you need printed documentation, may I recommend the Perl Cookbook
published by O'Reilly. The index has in the Database Access section:
14.8: Storing Complex Data in a DBM File
gnari
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 72
*************************************