[Israel.pm] annoying bugs

sawyer x xsawyerx at gmail.com
Sun Dec 28 02:25:58 PST 2008

I don't think this is too difficult to explain.

The problem lies in the mistake of trying to do an action on one that
does not receive such action.
They want to split an array. You cannot split an array, an array is
already split. You want to split a string. This could have simply been
a typo. If they would, for instance, do (under vim) :%s/@argv/$argv/g
everything would be okay.

On Sun, Dec 28, 2008 at 12:03 PM, Gabor Szabo <szabgab at gmail.com> wrote:
> As I am teaching I see beginners make lots of annoying mistakes that
> perl does not catch
> and is hard to explain.
> Eg.  What does the following code do and why?
> Gabor
> use strict;
> use warnings;
> my @argv = ("abcdXezXq");
> my @view = split ("X" , @argv );
> print @view;
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl

More information about the Perl mailing list