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
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 |
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
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
# (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
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
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
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
>
>
>
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:
>
>
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
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
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
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
: 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
is it possible to open a filehandle on a file change one line in that file
without outputing to another file.
15 matches
Mail list logo