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
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
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>
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
> "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>
On Fri, 2009-03-20 at 11:07 -0700, John W. Krahn wrote:
> Martin Spinassi wrote:
> > Hi list!
>
> Hello,
>
> > I've just started with perl, but I'm really excited about its power.
>
> I'm excited that you're excited! ;-)
I'm excited because you are excited because I'moryou.
doesn't
On Fri, 2009-03-20 at 18:48 +0100, Gunnar Hjalmarsson wrote:
> Martin Spinassi wrote:
> > Is there any way to open a file for input and output at the same time?
>
> Yes. Open it with the '+<' MODE.
>
> open my $fh, '+<', $file or die "Couldn't open $file: $!";
> my @keep;
> while (
Martin Spinassi wrote:
Hi list!
Hello,
I've just started with perl, but I'm really excited about its power.
I'm excited that you're excited! ;-)
I'm trying to edit a file, but couldn't find out how to do it without
making a temp file. I've been searching for the solution, but all I find
Martin Spinassi wrote:
Is there any way to open a file for input and output at the same time?
Yes. Open it with the '+<' MODE.
open my $fh, '+<', $file or die "Couldn't open $file: $!";
my @keep;
while ( <$fh> ) {
next if /^--/;
push @keep, $_;
}
seek $fh, 0
Hi list!
I've just started with perl, but I'm really excited about its power.
I'm trying to edit a file, but couldn't find out how to do it without
making a temp file. I've been searching for the solution, but all I find
is how to do it from command line, adding a "-i" to the execution.
My scrip
10 matches
Mail list logo