Re: [Perl-unix-users] Spawning a process

2001-12-17 Thread Grant Hopwood
pt to run to completion. Have you considered forking? (Parallel::Forkmanager) Grant Hopwood. Valero Energy Corp. (210)370-2380 PGP Public Key: Ldap://certserver.pgp.com nuclear iraq bioweapon encryption cocaine korea terrorist ___ Perl-Unix-Users mailing li

Re: [Perl-unix-users] UDP broadcasts

2001-08-01 Thread Grant Hopwood
sending to all of them. >Can this be done? what stupid, simple thing am I missing? I've never tried multicasting myself, but a UDP example can be found at... http://www.perldoc.com/perl5.6/pod/perlipc.html#Interactive%20Client%20with%20IO%3a%3aSocket Grant Hopwood. Valero Energy Corp. (210)

Re: [Perl-unix-users] regular expression problem!

2001-07-13 Thread Grant Hopwood
t;;} >if ($a=~/^HASH/) {print "Start with HASH\n";} The above two lines are not a very logical sequence of comparison at all... >my $firstChar=substr($a,0,1); >print "FIRST Char =>$firstChar<=\n"; >STDOUT on 5.005: > Contain HASH > Start whit HASH

Re: [Perl-unix-users] regex performance

2001-06-13 Thread Grant Hopwood
-start- > Grant Hopwood >at06/13/2001 01:37 PM >-start- PS: ># Concatenation should generally always be faster than substitution which kind of 'slices, dices, and stretches' ># a string. That is, faster when replacing almost all of the string. Grant Hopwood.

Re: [Perl-unix-users] regex performance

2001-06-13 Thread Grant Hopwood
nything that isnt a tab, discard. ([A-Z][A-Z]) # Two capital letters (XY) ([A-Z]) # One capital letter (Z) /x; # Concatenation should generally always be faster than substitution which kind of 'slices, dices, and stretches' # a string

Re: [Perl-unix-users] removing files of a given size from a given location

2001-06-13 Thread Grant Hopwood
ing anywhere. >I can't tell where the output of the stat command is >going since I have all I need in that output. It would >probably be easy to parse it and get the file size and >then compare it to some number... >Anybody any idea? $ man find $ find /my/dir -size -100c

Re: [Perl-unix-users] telnet using perl

2001-06-01 Thread Grant Hopwood
mmand="root\r\n";$ >13 &ExecuteAndPrint ($command);$ >14 $command="password\r\n";$ Net::Telnet Grant Hopwood. Valero Energy Corp. (210)370-2380 PGP Public Key: Ldap://certserver.pgp.com nuclear iraq bioweapon encryption cocaine korea terrorist __

Re: [Perl-unix-users] READING FROM FILE

2001-04-16 Thread Grant Hopwood
r_log | grep -F [error]`; # where -100 is the number of lines to read from end of file. Grant Hopwood. Valero Energy Corp. (210)370-2380 PGP Public Key: Ldap://certserver.pgp.com nuclear iraq bioweapon encryption cocaine korea terrorist ___ Perl-Unix-U

Re: [Perl-unix-users] Compare timestamp using localtime objects

2001-04-12 Thread Grant Hopwood
time in seconds since epoch. use Date::Manip; $main::TZ = 'CST'; my $stamp = 'Wed Apr 11 22:05:09 2001'; my $prev = time-360; # no need for localtime if ($prev < UnixDate($stamp,"%s")) { print "ok\n"; } Grant Hopwood. Valero Energy Corp. (210)370-2380

[Perl-unix-users] Re: FTP across platforms

2001-03-12 Thread Grant Hopwood
uld be appreciated. >#Create a FTP handle object >$ftp = Net::FTP->new('***.***.***.***', Timeout => 500) || die "WARNING!Could not create FTP handle"; my $ftp = Net::FTP->new($host, Timeout => 500, Debug => 1) or die "unable to connect\n"; And

Re: [Perl-unix-users] Executing Unix script to access files on NT side

2001-02-16 Thread Grant Hopwood
as the most secure. Use a rsh daemon (no login required) or write your own TCP daemon (in Perl) at your own risk. Grant Hopwood. Valero Energy Corp. (210)370-2380 PGP Public Key: Ldap://certserver.pgp.com -= Fail"ure: 'fA(&)l-y&r, noun, When your best just isn't good eno

Re: [Perl-unix-users] Read the Last line in a file

2001-02-15 Thread Grant Hopwood
t line in a file. Probably the best methods for handling possibly large files would be... my $line; open(FH, "file.txt") or die $!; $line = $_ while ; close FH; print $line; # or on Unix.. my $line = `tail -n 1 file.txt`; Grant Hopwood. Valero Energy Corp. (210)370-2380 PGP Public K