rmtree

2001-09-12 Thread Tambet Ingo
Hello, I'm having trouble using rmtree function from File::Path. It fails in rmtree function: . my($root); foreach $root (@{$roots}) { $root =~ s#/\z##; (undef, undef, my $rp) = lstat $root or next; $rp &= 0; # don't forget setuid, setgid, sticky bits if

Re: rmtree

2001-09-12 Thread Michael Fowler
On Wed, Sep 12, 2001 at 10:42:53AM +0200, Tambet Ingo wrote: > . > my($root); > foreach $root (@{$roots}) { > $root =~ s#/\z##; > (undef, undef, my $rp) = lstat $root or next; > $rp &= 0; # don't forget setuid, setgid, sticky bits > if ( -d _ ) { > . >

Re: '' and ""

2001-09-12 Thread Maxim Berlin
Hello Matija, Tuesday, September 11, 2001, Matija Papec <[EMAIL PROTECTED]> wrote: MP> Is there a reason why '' should be preferred over "" when using static MP> expressions? My guess is that "" takes a little longer at compile time for at run time. inside loop, for example. MP> perl to see if

Re: line end problems - help #2

2001-09-12 Thread Maxim Berlin
Hello Ron, Wednesday, September 12, 2001, Ron Woodall <[EMAIL PROTECTED]> wrote: RW> I asked a similar question before and got no response. I guess I didn't RW> explain myself. RW> Here's the problem. I'm using a perl script to create an html page. The RW> editor is located on a

RE: Perl and files bigger then 2GB

2001-09-12 Thread Ron Rohrssen
I regularly work with files ASCII files larger than 2g without any problem. What exactly is the problem that you are experiencing? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 12:42 PM To: [EMAIL PROTECTED] Subject: Perl and file

Trying to close a port with perl

2001-09-12 Thread Randy5235
Ok I am sure this is not the best way to do it (esoecially since it doesn't seem to work for me!) any ideas??? Randy5235 #!/usr/bin/perl use IO::Socket; #get port number print"what port do you want to close?\n"; $port=; $local = IO::Socket::INET->new(Proto=>"tcp", LocalPort=> $port, Listen=

Re: Function & Parameters Problem

2001-09-12 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Wed, 12 Sep 2001 16:51:13 +0200 (MEST) From: Jorge Goncalvez Subject: Re: Function & Parameters Problem Mime-Version: 1.0 Content-MD5: /AKUA+PVUkkQyC62C5CZ8A== Hi, I have this code: &makelabels($language_EA,$ethernet_address); &makelab

File Parsing

2001-09-12 Thread Adams, Troy L
Folks, This is my first post to this list and I am in need of help..I am using ActivePerl on Win2K and need to parse a file of data so that I have the number of the folder and the users who have permissions on each folder. I am not worried about their level of control. I am including sample data

Crypt::GPG produces warnings and blank file

2001-09-12 Thread Mark Ross
Hi all, I'm trying to take a bit of input and encrypt it via GnuPG. I'm using Crypt::GPG to interface with it, and its driving me batty. Here's the code: #!/usr/bin/perl -w use strict; use Crypt::GPG; my $gpg = new Crypt::GPG; $gpg->gpgbin('/usr/local/bin/gpg'); $gpg->gpgopts('--no-secmem-wa

Re:File Parser

2001-09-12 Thread Jorge Goncalvez
Hi, I would like to open a file , and know if it contains the word DHCPDISCOVER on it , How can I do this in Perl? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: NET::FTP to retrieve files over HTTP?

2001-09-12 Thread Pete Sergeant
"Craig Paterson" <[EMAIL PROTECTED]> wrote in message 021601c13a9a$bae3f240$0925020a@avalon">news:021601c13a9a$bae3f240$0925020a@avalon... > is this possible? or is there another library > i should use? I looked at the HTTP library but > can't see how you would do it and save the file. LWP is yo

how to pass vars

2001-09-12 Thread Jerry Preston
Hi, I need to pass a string of values to a perl script via: $numbers = " 1 2 3 4 5 6 7 8 9"; $s = "http://www/cgi-bin/passing.cgi?Number=$p&data=$numbers\";>$numbers"; When I do this all I get is the value "1"! Can this be done? If so how? Thanks for your help! Jerry -- To unsubscri

Re: how to pass vars

2001-09-12 Thread Brett W. McCoy
On Wed, 12 Sep 2001, Jerry Preston wrote: > Hi, > > I need to pass a string of values to a perl script via: > > $numbers = " 1 2 3 4 5 6 7 8 9"; > > $s = " href=\"http://www/cgi-bin/passing.cgi?Number=$p&data=$numbers\";>$numbers"; > > When I do this all I get is the value "1"! Build an arra

Re: Search --> Replace on Unix

2001-09-12 Thread lc-brian_d_foy
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (John W. Krahn) wrote: > brian d foy wrote: > > In article <[EMAIL PROTECTED]>, > > [EMAIL PROTECTED] (David Gilden) wrote: > > > perl -e 'foreach $file (glob("*")) {grep '../forum_idx.pl' >'../cgi-bin/forum_idx.pl');}' > > perl -pi.old -

Re: how to pass vars

2001-09-12 Thread Brett W. McCoy
On Wed, 12 Sep 2001, Brett W. McCoy wrote: > > Hi, > > > > I need to pass a string of values to a perl script via: > > > > $numbers = " 1 2 3 4 5 6 7 8 9"; > > > > $s = " > href=\"http://www/cgi-bin/passing.cgi?Number=$p&data=$numbers\";>$numbers"; > > > > When I do this all I get is the valu

CPAN simple module

2001-09-12 Thread siren jones
_ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

CPAN simple module

2001-09-12 Thread siren jones
Does anyone know of a reasonably simple, CPAN, stand-alone module? By stand-alone, I mean it doesn't require any other modules to be previously installed. I'm trying to figure out how to install a module and get it to work. Originally I was trying to do this on an SGI network, for the time bei

Re: Function & Parameters Problem

2001-09-12 Thread Stephen P. Potter
Lightning flashed, thunder crashed and Jorge Goncalvez <[EMAIL PROTECTED] l.fr> whispered: | Hi, I have this code: | | &makelabels($language_EA,$ethernet_address); | &makelabels($language_IP,$IP_address); | &makelabels($language_CN,$client_name); | &makelabels($language_BF,$boot_file); | &makelab

Calling a batch file from Perl script

2001-09-12 Thread Najamuddin, Junaid
Hi, Thanks in advance I have a small problem I wrote a Perl script in windows NT environment which uses a text file, which is an output of a batch file how it is possible to run that batch file from my script and then pause for like five seconds and then run rest of the script so that the text f

Re: line end problems - help #2

2001-09-12 Thread Ron Woodall
Hi All: Maxim wrote: >If you use FTP to transfer file between windows and linux, switch your >ftp client to 'ascii' mode. >If not, tell your editor to save output file in unix format. I store the file directly to the Linux machine and tried setting the editor to save in unix format. N

Re: line end problems - help #2

2001-09-12 Thread Curtis Poe
--- Ron Woodall <[EMAIL PROTECTED]> wrote: > Hi All: > > Maxim wrote: > > >If you use FTP to transfer file between windows and linux, switch your > >ftp client to 'ascii' mode. > >If not, tell your editor to save output file in unix format. > > I store the file directly to the Linux ma

Re: Calling a batch file from Perl script

2001-09-12 Thread Andrea Holstein
Junaid Najamuddin wrote: > I wrote a Perl script in windows NT environment which uses a text file, > which is an output of a batch file > how it is possible to run that batch file from my script and then pause for > like five seconds and then run rest of the script > so that the text file which ra

"system" command failure

2001-09-12 Thread Tyler Cruickshank
Hello. I am trying to use the system command to run a FORTRAN program on my Solaris 5.7 system. In the code pasted below the following system call: system("chmod 777 /trinidad/uamaero/inputConversions/Bin2Ascii/bin2asciiInputFile.in"); works just fine. When I actually try to run my FORTRAN

Re[2]: line end problems - help #2

2001-09-12 Thread Maxim Berlin
Hello Ron, Thursday, September 13, 2001, Ron Woodall <[EMAIL PROTECTED]> wrote: >>If you use FTP to transfer file between windows and linux, switch your >>ftp client to 'ascii' mode. >>If not, tell your editor to save output file in unix format. RW> I store the file directly to the Lin

Re[2]: line end problems - help #2

2001-09-12 Thread Maxim Berlin
Hello Curtis, Thursday, September 13, 2001, Curtis Poe <[EMAIL PROTECTED]> wrote: CP> That will show non-printing characters (-v) and the end of line will be indicated with a dollar CP> sign (-E). If you see a ^M before the end of line, you have saved the file in DOS mode. To fix CP> it, use

Re: File Parsing

2001-09-12 Thread Andrea Holstein
Troy L Adams wrote: > > This is my first post to this list and I am in need of help..I am using > ActivePerl on Win2K and need to parse a file of data so that I have the > number of the folder and the users who have permissions on each folder. I am > not worried about their level of control. I a

Re: "system" command failure

2001-09-12 Thread Maxim Berlin
Hello Tyler, Thursday, September 13, 2001, Tyler Cruickshank <[EMAIL PROTECTED]> wrote: TC> Hello. I am trying to use the system command to run a FORTRAN TC> program on my Solaris 5.7 system. In the code pasted below the TC> following system call: TC> system("chmod 777 /trinidad/uama

Set locales independent of OS-System

2001-09-12 Thread Andrea Holstein
Hi, I write modules for the german language. At the moment, I simply tell perl at the beginning use locale; That run's because my Linux is a german one. At a french one i would'nt run any longer. A better way could be (from the Cookbook) use locale; use POSIX 'locale_h'; setlocale(LC_TYPE, 'de_

Re: Re[2]: line end problems - help #2

2001-09-12 Thread Curtis Poe
--- Maxim Berlin <[EMAIL PROTECTED]> wrote: > Hello Curtis, > > Thursday, September 13, 2001, Curtis Poe <[EMAIL PROTECTED]> wrote: > > CP> That will show non-printing characters (-v) and the end of line will be >indicated with a > dollar > CP> sign (-E). If you see a ^M before the end of line

RE: Split and pattern match problem

2001-09-12 Thread Bradshaw, Brian
Thanks for the info I got. I wound up with: @stringT = split(//i, $qText); to do what I needed. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Is there a better way to do this

2001-09-12 Thread Bradshaw, Brian
Another question for the list, I have the code: $z = 0; foreach(@key = keys(%result)) { $arr_DBanswers[$z] = $result{$_}; $z=$z+1; } Is there a better way to break out the values in a hash list to a single array? I'd be curious to know. Thanks. -- To unsubscribe, e-mail: [EMAI

Re: Is there a better way to do this

2001-09-12 Thread Jason Tiller
Hi, Again, Brian, :) On Wed, 12 Sep 2001, Bradshaw, Brian wrote: > I have the code: > $z = 0; > foreach(@key = keys(%result)) > { >$arr_DBanswers[$z] = $result{$_}; >$z=$z+1; > } > Is there a better way to break out the values in a hash list to a > single array? How about @arr

Re: Getting Month Day from `date`

2001-09-12 Thread C.J. Collier
Heya Richard, Looks like your problem is the newline that date sticks on the end of its output. I suggest using the POSIX function strftime, or chomping the \n off of the date $d = `date "+%b %d"`; chomp $d; print "$d\n"; or use POSIX; $d = strftime("%d %b", localtime()); print "$d\n"; Cheer

Re: "system" command failure

2001-09-12 Thread Robert Citek
Hello Tyler, A return value of 0 from a system call means that it ran successfully. Any other value means something went wrong. For example, this script: #!/usr/bin/perl -w use strict; my $system; $system = system("echo Hello, World"); print $system . "\n"; $system = system("grok

Re: Trying to close a port with perl

2001-09-12 Thread Randy5235
Sorry needed to reset my clock !! "Randy5235" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Ok I am sure this is not the best way to do it (esoecially since it doesn't > seem to work for me!) any ideas??? > Randy5235 > > > > > > #!/usr/bin/perl > > use IO::Soc