It would be helpful if you could provide an input string and what you expect the output to be.#!/usr/bin/perl -w use strict; my $a = "124 abc78980 abc 9872345987abcbca4321"; my $variable = "abc"; my @line=split(/$variable/,$a); print join("\n",@line),"\n"; __END__ prints: 124 78980 9872345987 #interesting bca4321 #also interesting
In reply to Re: Split Help
by Marshall
in thread Split Help
by de2425
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |