Re: FILEHANDLE question on AIX machine

2006-03-03 Thread Tom Phoenix
On 3/3/06, Families Laws <[EMAIL PROTECTED]> wrote: > what is the purpose of ". 2>&1 |" ? This is a AIX > machine. Thanks. > open(FILEHANDLE, "$PATH_TO_WSADMIN -f $tmpFile > ". ' 2>&1 |'); The '2>&1' part is shell syntax meaning to redirect what would go to filehandle 2 (STDERR) to file

Re: FILEHANDLE question on AIX machine

2006-03-03 Thread The Ghost
I believe this is actually part of the shell command to open that file. It redirects STDOUT and STDERR to a file (shell's, not perl's). As for the "|", I don't know. On Mar 3, 2006, at 1:12 PM, Families Laws wrote: 2>&1 |

FILEHANDLE question on AIX machine

2006-03-03 Thread Families Laws
I have to maintain a perl script, and encounter the following section: can anyone help me to understand what is the purpose of ". 2>&1 |" ? This is a AIX machine. Thanks. unless (@errors) { open(FILEHANDLE, "$PATH_TO_WSADMIN -f $tmpFile ". ' 2>&1 |'); while () { if

Re: filehandle question

2006-01-18 Thread Alan
On Tuesday 17 January 2006 09:30, radhika wrote: [ . . ] > 409$plain_text .= $_ foreach (<$fh>); >close $fh; > --code end-- > > I keep getting this error: > > readline() on closed filehandle $fh at > /home/ars/sys/libperl/site/ARS/REPORTS/AggregateFills.pm line 409. Is that above line

RE: filehandle question

2006-01-17 Thread Charles K. Clarkson
# (Prematurely?) declare lexical variable 405 my $fh; # Get file name from the $file object. 406 my $txtfile = $file->fileName(); # Open file using lexical variable # declared earlier for file handle. # Do not test file opening for success. 407

Re: filehandle question

2006-01-17 Thread Shawn Corey
radhika wrote: Hi, Can someone tell me what is going on in this peice of code? Especially, line 409. --code start-- 405my $fh; 406my $txtfile = $file->fileName(); 407open $fh, $txtfile; open $fh, $txtfile or die "cannot open $txtfile: $!\n"; 408my $plain_text = ''; 409$p

filehandle question

2006-01-17 Thread radhika
Hi, Can someone tell me what is going on in this peice of code? Especially, line 409. --code start-- 405my $fh; 406my $txtfile = $file->fileName(); 407open $fh, $txtfile; 408my $plain_text = ''; 409$plain_text .= $_ foreach (<$fh>); close $fh; --code end-- I keep getti

AW: short filehandle question

2001-07-02 Thread Ela Jarecka
Brilliant! Thanks, no more warnings :-) Ela > -Ursprüngliche Nachricht- > Von: Michael Fowler [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 29. Juni 2001 19:20 > An: Ela Jarecka > Cc: Beginners list (E-Mail) > Betreff: Re: short filehandle question > > >

Re: short filehandle question

2001-06-29 Thread Michael Fowler
On Fri, Jun 29, 2001 at 02:28:50PM +0200, Ela Jarecka wrote: > Hi, > Executing my program with -w option I get the following warning: > 'Value of construct can be "0"; test with defined() at readData > line 65535.' > > Surely I do not have 65535 lines in my program, but I suspect this one: > >

Re: AW: short filehandle question

2001-06-29 Thread Paul
red as my $FILEH at the beginning of the file... Could > you tell > > me what the difference is? > > > > Ela > > > > > -Ursprüngliche Nachricht- > > > Von: Jerry Preston [mailto:[EMAIL PROTECTED]] > > > Gesendet: Freitag, 29. Juni 20

Re: AW: short filehandle question

2001-06-29 Thread Jerry Preston
ng of the file... Could you tell > me what the difference is? > > Ela > > > -Ursprüngliche Nachricht- > > Von: Jerry Preston [mailto:[EMAIL PROTECTED]] > > Gesendet: Freitag, 29. Juni 2001 15:39 > > An: Ela Jarecka > > Betreff: Re: short filehandle qu

AW: short filehandle question

2001-06-29 Thread Ela Jarecka
Hi, It is declared as my $FILEH at the beginning of the file... Could you tell me what the difference is? Ela > -Ursprüngliche Nachricht- > Von: Jerry Preston [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 29. Juni 2001 15:39 > An: Ela Jarecka > Betreff: Re: short file

short filehandle question

2001-06-29 Thread Ela Jarecka
Hi, Executing my program with -w option I get the following warning: 'Value of construct can be "0"; test with defined() at readData line 65535.' Surely I do not have 65535 lines in my program, but I suspect this one: #reading data open (FILEH, $filename) or die "Can't open file!\n"; while ($l

Re: filehandle question

2001-05-04 Thread Timothy Kimball
: is it possible to open a filehandle on a file change one line in that file : without outputing to another file. You can open the file, seek() to a particular position in it, and start overwriting the file at that position, but when you reach the end of that line, you'll keep on writing past it

filehandle question

2001-05-04 Thread Chris Rutledge
is it possible to open a filehandle on a file change one line in that file without outputing to another file.