Hi,
Urrk. Don't know what I was thinking earlier...of course this
my $entireFile = (<FILEHANDLE>);
won't give the entire file....I'm tired & overworked at the moment though!
I'd usually do
my $entireFile = join ('',(<FILEHANDLE>));
Ta ta
Steve :)
Hi,
"...I still don't understand how saying if(@mydata) evaluates the array as a scalar?
"
Me neither! It's part of the Perl language that it will try to do what you expect. It just comes with time & practice. I'm sure if I was a better scripter I'd learn exactly how this all...
Hi Martin,
Not sure how well I'm able to explain this (hopefully one of the gurus here will do a better job) - basically Perl evaluates operations in either a scalar or list context.
In the case of the array test you give, Perl is evaluating the array in a scalar context, which returns the...
Hi,
A scalar is any 'singular' variable, ie.
$scalar = "bob";
$scalarReferenceToa = \$a;
$scalarAnonymousArrayReference = ['a','b','c'];
If it starts with a '$', it's a scalar.
A 'plural' variable is of course an array or hash. ie.
@array = ('a','b','c');
%hash =...
Hi,
Forgive me if I've misunderstood, but it seems you're not actually sending the cookie to the client, so of course the value of $ENV{HTTP_COOKIE} won't change. You need to create header, including the "Set-Cookie: mycookie=mycookieval" line, and send it to the client. The client...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.