On Sun, 2006-02-04 at 06:59 -0400, John Ackley wrote:
> Inherited code (from Verisign):   @[EMAIL PROTECTED] = split /\t/,$rec;
> which worked but really puzzled me.
> 
>  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?
> 
> I understand the right side produces a list from a string.
> 
> I do not understand the first @ on the left side.
> Does it produce a list of $datafield{one}, $datafield{two}, . . . ?
> assuming @send = ( one, two, . . .);
> 
> Can someone point out documentation that explains
> this use of @?  I learned that @ flags an array.

The statement: @[EMAIL PROTECTED] = split /\t/,$rec;
uses slices to set values of %datafield. See `perldoc perldata` and
search for slice.

-- 
__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