On Sun, 2006-02-04 at 06:59 -0400, John Ackley wrote:
>  I assumed that it meant    [EMAIL PROTECTED] = split /\t/,$rec;
> which worked also as I verified by testing both versions.
> 
> However [EMAIL PROTECTED] = split /\t/,$rec;
> gives the warning quote: Use of implicit split to @_ is deprecated
> at . . .
> 
> Could some please explain the error messages
> and the syntax of these lines of code?
> 

For: [EMAIL PROTECTED] = split /\t/,$rec;

First, [EMAIL PROTECTED] is the same as $datafield{ scalar( @send ) }.
In other words, @send is used in scalar context and means the number of
elements in @send.

Second, split /\t/, $rec is also in scalar context, which means its
results is assigned to @_ and the number of elements in this list is
assigned to $datafield{scalar(@send)}. It is no longer considered good
practise to use @_ in this manner.


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them,
we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to