above code is untesteduse strict; my $file; { local $/; $file = <>; } $file =~ s!$/!!g; my @elements = split /\|/, $file;
Update
By the way, there is more info about split in the library. I just noticed this was your first post, and that no one pointed you there, so I thought I would mention it as a reference.
In reply to Re: Split function
by Adam
in thread Split function
by nala45
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |