Re: [MacPerl-WebCGI] well split!!!
[email protected] (Adam Witney) Wed, 07 Mar 2001 10:26:23 -0500
| Newsgroups | perl.macperl.webcgi |
|---|---|
| Message-ID | <B6CBBD4E.827B%[email protected]> |
from perlfunc.pod > split > > Splits a string into an array of strings, and returns it. in this case you are specifically naming the members of the array rather than using the positional $array[0], $array[1] etc notation. the 'my' is irrelevant for the function of split, it is just setting the scope of the resulting variables. HTH adam > Where do you people find statements like -- > > my ($database_id, $category, $variable_name, $price, $description, > $item_number) = split(/\t/); > > -- anyway? I have numerous books on Perl (including the "Perl Black > Book") and none of them come even close to describing anything like > that in providing a definition for split(). > > However, in a single book, namely "CGI How-To", the author uses the > following statement: > > > ($database_id,$category,$variable_name,$price,$name,$description,$item_number) > =split(/\|/,$_); > > But, please note the absence of "my". > > It's like I'm trying to learn how to program a box of alphabet > cereal. You people throw out stuff that's not documented in any of > the reference material I have. It's not a complaint, just an > observation. > > tedd > > > > -- > http://sperling.com/