$ perl -le' for my $string ( "b019200184010", "bhs019200184010" ) { my ( $first, $second ) = split /0/, $string, 2; print "First: $first Second: $second"; } ' First: b Second: 19200184010 First: bhs Second: 19200184010
In reply to Re: Split on first of several
by jwkrahn
in thread Split on first of several
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |