in reply to Source Grabber
You wrote my $length=length(@list); and this is completely wrong. You should have written my $length = @list; instead. Here's what you got: length() puts its argument in scalar context and evaluates it as a string. An array in scalar context returns the number of elements it contains. A number that's used like a string is converted to a string. length() returns the number of characters in its string. So if you had ten elements in the list, you were doing the equivalent of length("10") which is 2.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Source Grabber
by Andrew_Levenson (Hermit) on Mar 30, 2006 at 02:30 UTC | |
|
Re^2: Source Grabber
by parv (Parson) on Mar 31, 2006 at 06:46 UTC | |
by diotalevi (Canon) on Mar 31, 2006 at 14:12 UTC | |
|