Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Fri, 29 Apr 2005 03:24:52 -0700
Ing. Branislav Gerzo wrote:
JupiterHost.Net [JN], on Thursday, April 28, 2005 at 09:11 (-0500) contributed this to our collective wisdom:
(really beginners) could think "@a" will empty array, which is not true.
JN> yes it is true, they are both empty lists:
@a will not empty array, here it is:
my @a = q{foo bar}; @a; print @a;
against
my @a = q{foo bar}; @a = ( ); print @a;
I hope you see the difference :)
And you would as well if you had warnings enabled as the first example would warn you about using an array in void context.
$ perl -le'
use warnings;
my @a = qw{foo bar};
@a;
print @a;
'
Useless use of private array in void context at -e line 3.
foobarJohn -- use Perl; program fulfillment .
- References:
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: DBSMITH
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: JupiterHost.Net
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: JupiterHost.Net
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: John W. Krahn
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- From: JupiterHost.Net
- Re: REGEXP removing - il- - -b-f and - il- - - - f
- Prev by Date: Re: parsing command line arguments multiple times
- Next by Date: How can I automate the removal of hard-coded banners from locally saved web pages
- Previous by thread: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Next by thread: Re: REGEXP removing - il- - -b-f and - il- - - - f
- Index(es):
Relevant Pages
|
|