On Tue, 2006-09-05 at 09:44 -0700, chen li wrote:
>  split /PATTERN/,EXPR,LIMIT
>  split /PATTERN/,EXPR
>  split /PATTERN/
>  split
> 
> 1. I check the perldoc -f split but I am not quite
> sure what EXPR really means. Does it refer to a
> string, or a scalar variable contaning a string, or an
> array? From what I learn from camel book I don't find
> an example that shows "split" can work on an array.
> But it works fine for my array transition. Am I
> missing something?

EXPR stands for any expression that evaluates to a scalar. If you use an
array here, it's the same as:

split /PATTERN/, scalar( @array );  

> 
> 2. In this line $ perl -le what does -le mean?
> 

Command line options can be found in `perldoc perlrun`.


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