Re: Multiple directory handles...?

2002-08-10 Thread John W. Krahn
Ron Smith wrote: > > 5 if (@ARGV) { > 6 foreach $ARGV (@ARGV) { > 7 opendir (DIR, "$ARGV") or die "$!"; > 8 } > 9 } > > So far, it looks like the last command-line argument is stepping on any other > arguments that come before it. Is there a way to a

Sorting a list by...

2002-08-10 Thread david
Well, being way down on the perl food chain, i interpreted (mis-interpreted?) this request a little different and offer a simplistic and not entirely correct approach but still i would like to offer it. It seemed to me that he was looking to split() the line into month | date | time | byte si

Multiple directory handles...?

2002-08-10 Thread Ron Smith
5 if (@ARGV) { 6 foreach $ARGV (@ARGV) { 7 opendir (DIR, "$ARGV") or die "$!"; 8 } 9 } So far, it looks like the last command-line argument is stepping on any other arguments that come before it. Is there a way to assign multiple command-line args t

Re: Multiple directory handles?

2002-08-10 Thread drieux
On Saturday, August 10, 2002, at 08:02 , Ron Smith wrote: > 5 if (@ARGV) { > 6 foreach $ARGV (@ARGV) { > 7 opendir (DIR, "$ARGV") or die "$!"; > 8 } > 9 } > > > So far, it looks like the last command-line argument is stepping on any > other > arguments t

Multiple directory handles?

2002-08-10 Thread Ron Smith
5 if (@ARGV) { 6 foreach $ARGV (@ARGV) { 7 opendir (DIR, "$ARGV") or die "$!"; 8 } 9 } So far, it looks like the last command-line argument is stepping on any other arguments that come before it. Is there a way to assign multiple command-line args

Re: Sorting a list by...

2002-08-10 Thread Connie Chan
[] [] > or die "Couldn't open $log!"; > while ($line = ) { > if ($line =~ /byte/i) { print $line } > } > close (FILE); Hi all, for the above lines. I guess the OP gentleman is not dealing with a 1GB log for what he asked. He had writtern something for picking up those lines

Re: How does ZOMBIE/defunct affect the system?

2002-08-10 Thread drieux
On Saturday, August 10, 2002, at 12:35 , Ahmed Moustafa wrote: [..] > > Is there a way that I can fork a process and let the execution go without > waiting for the forked process to finish, please? > [..] what you want is how do I create a demon process that will be able to run indepe

Re: How does ZOMBIE/defunct affect the system?

2002-08-10 Thread Ahmed Moustafa
Drieux wrote: > > >use POSIX ":sys_wait_h"; >#... >do { >$kid = waitpid(-1,&WNOHANG); >} until $kid == -1; Does the execution of the program wait to all the forked processes to terminate? T

Re: Sorting a list by...

2002-08-10 Thread Robin Norwood
Kevin Pfeiffer <[EMAIL PROTECTED]> writes: > Robin Norwood writes: > > Samuel Brown <[EMAIL PROTECTED]> writes: > > > Hi ya, > > > > > > I'm teaching myself Perl and I have a log file around 1GB that I need > > > to sort by month | date | time | byte size. So far I have parse the log > > > for "b

Re: How does ZOMBIE/defunct affect the system?

2002-08-10 Thread drieux
On Friday, August 9, 2002, at 09:14 , Ahmed Moustafa wrote: > If a Perl program generates ZOMBIE/defunct processes, how does that > affect the system? [..] theoretically each process takes up an index in the process table, and hence one can reach the moment where the kernel can not fork anot

Re: GD::Graph logo_resize question

2002-08-10 Thread zentara
On 09 Aug 2002 11:33:35 +, [EMAIL PROTECTED] (Kevin Old) wrote: > logo => >'/home/motorola/local/apache/graphic/motorola.png', > logo_resize => '1.0' > ); >Everything works fine, and the logo is it's normal size. What I'd like >to do is make it a little smaller

Re: Creating the first GUI for Windows in Perl using Tk or Win32::GUI

2002-08-10 Thread Octavian Rasnita
When trying to run the sample script that uses the Tk module, it gave me the following error: Can't locate loadable object for module Tk::Event in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/Tk.pm line 13 Compilation failed in require at C:/Perl/site/lib/Tk.pm line 13

use of uninitialised value..

2002-08-10 Thread Nandita Mullapudi
thanks, all, the script is working!! small pleasures of life.. cheers! -nandita -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: DBD::CSV question

2002-08-10 Thread Janek Schleicher
Gregg O'Donnell wrote at Fri, 09 Aug 2002 20:32:38 +0200: > Hey - I'm trying to put this together from studying the perldoc. Do I need to define >"my $table =" and if so, to the csv file? Also, the number of scalars should equal >the number of question marks? > > use DBI; > > my $dbh = DBI->c

Re: Need help

2002-08-10 Thread Janek Schleicher
Junaid Najamuddin wrote at Fri, 09 Aug 2002 23:22:45 +0200: > I am trying to read the last 10 lines of a log file. There are also some other ways to read the last 10 lines without you'll have to implement the logic for yourself: tie my @line, 'Tie::File', 'log.dat' or die "..."; my @last_ten =

Re: Sorting a list by...

2002-08-10 Thread Janek Schleicher
Samuel Brown wrote at Sat, 10 Aug 2002 00:07:34 +0200: > I'm teaching myself Perl and I have a log file around 1GB that I need to sort > by month | date | time | byte size. So far I have parse the log for "bytes" > since this is all that I need but I can't get it to sort like I want. > > Here