--- "Kipp, James" <[EMAIL PROTECTED]> wrote:
> > scalar <HEAD>
> >
> > puts the filehandle access into a scalar context so that it will
> > only return one record each time. =o)
>
> without slurping the whole file !! , great thanks
No problem. =o)
Context is something you really have to grasp in Perl.
>From perldoc perlfunc:
Remember the following important rule: There *is*no*rule*
that relates the behavior of an expression in list context to its
behavior in scalar context, or vice versa. It might do two totally
different things. Each operator and function decides which sort of
value it would be most appropriate to return in scalar context.
Some operators return the length of the list that would have been
returned in list context. Some operators return the first value in
the list. Some operators return the last value in the list.
Some operators return a count of successful operations. In general,
they do what you want, unless you want consistency.
That being said, you need to always be aware of what the current
context is.....
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/