There's more than one way to do things | |
PerlMonks |
Deleting specific array elementsby joec_ (Scribe) |
on Nov 26, 2008 at 09:42 UTC ( [id://726049]=perlquestion: print w/replies, xml ) | Need Help?? |
joec_ has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Maybe i'm being exceptionally stupid :P but how does one go about deleting a specific element from an array? I have the following code: foreach $mol (@molecules) { So, i would like to delete any elements in @molecules (array created via split) that contain elements with just new lines in. When i run it, i get Argument "\n" isn't numeric in splice Any help or advice appreciated Thanks -- Joe.
Back to
Seekers of Perl Wisdom
|
|