Re: Editing file

2009-03-21 Thread Chas. Owens
On Sat, Mar 21, 2009 at 14:36, Gunnar Hjalmarsson wrote: > Chas. Owens wrote: >> >> There is also the ongoing danger of putting untrusted file names in >> @ARGV[4], > > $ perl -we "undef @ARGV[4]" > Scalar value @ARGV[4] better written as $ARGV[4] at -e line 1. > $ > > Maybe your previous footnote

Re: Editing file

2009-03-21 Thread Gunnar Hjalmarsson
Chas. Owens wrote: There is also the ongoing danger of putting untrusted file names in @ARGV[4], $ perl -we "undef @ARGV[4]" Scalar value @ARGV[4] better written as $ARGV[4] at -e line 1. $ Maybe your previous footnote style was better after all. ;-) -- Gunnar Hjalmarsson Email: http://www.gu

Re: Editing file

2009-03-21 Thread Gunnar Hjalmarsson
Randal L. Schwartz wrote: "Gunnar" == Gunnar Hjalmarsson writes: Gunnar> Martin Spinassi wrote: Is there any way to open a file for input and output at the same time? Gunnar> Yes. Open it with the '+<' MODE. Gunnar> open my $fh, '+<', $file or die "Couldn't open $file: $!"; Gunnar>

Re: Editing file

2009-03-21 Thread Chas. Owens
On Sat, Mar 21, 2009 at 11:05, Randal L. Schwartz wrote: >> "Gunnar" == Gunnar Hjalmarsson writes: > > Gunnar> Martin Spinassi wrote: >>> Is there any way to open a file for input and output at the same time? > > Gunnar> Yes. Open it with the '+<' MODE. > > Gunnar>     open my $fh, '+<', $fil

Re: Editing file

2009-03-21 Thread Randal L. Schwartz
> "Gunnar" == Gunnar Hjalmarsson writes: Gunnar> Martin Spinassi wrote: >> Is there any way to open a file for input and output at the same time? Gunnar> Yes. Open it with the '+<' MODE. Gunnar> open my $fh, '+<', $file or die "Couldn't open $file: $!"; Gunnar> my @keep; Gunnar>