John W. Krahn am Mittwoch, 25. Oktober 2006 19:04: > D. Bolliger wrote: > > Mug am Mittwoch, 25. Oktober 2006 13:12: > >>I don't know if that anyway I can know what should I pass back > >>from right hand side to left hand side, like : > >> > >>my $x = qw/a b c d e / ; # so I have $x = 5 > > > > The list on the right hand side is evaluated in scalar context, and that > > delivers the number of entries in the list. > > No it doesn't: > > $ perl -le' $x = qw/ a b c d e /; print $x' > e
That's the line I should have run before posting... thanks John, and sorry to Mug, a list behaves different than an array: $ perl -le' @y = qw/ a b c d e /; [EMAIL PROTECTED]; print $x' 5 Dani -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>