One way is to use split:
use strict; use warnings; while (<DATA>) { chomp; my @tokens = split /\|/; print "Wrestlername: $tokens[0]\n"; print "Crowdreaction: $tokens[1]\n"; print "Specialmove: $tokens[2]\n\n"; } __DATA__ The Rock|Cheer|Rock Bottom Triple H|Boo|Pedigree Stone Cold|Cheer|Stone Cold Stunner
prints out:
Wrestlername: The Rock Crowdreaction: Cheer Specialmove: Rock Bottom Wrestlername: Triple H Crowdreaction: Boo Specialmove: Pedigree Wrestlername: Stone Cold Crowdreaction: Cheer Specialmove: Stone Cold Stunner
In reply to Re: Script issue involves File Handling.
by toolic
in thread Script issue involves File Handling.
by Irishboy24
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |