$ perl -e '$_ = "USERID1|2215|Jones|";
> my( $x, $y, $z ) = split /\|/;
> print "( $x, $y, $z )\n";'
( USERID1, 2215, Jones )
$ perl -e '$_ = "USERID1|2215|Jones|";
> ( $x, $y, $z ) = split /\|/, 3;
> print "( $x, $y, $z )\n";
> '
( 3, , )
$ perl -e '$_ = "USERID1|2215|Jones|";
> ( $x, $y, $z ) = split /\|/, $_, 3;
> print "( $x, $y, $z )\n";
> '
( USERID1, 2215, Jones| )
####
my @strings = qw(
USERID1|2215|Jones
USERID1|1000|Jones
USERID3|1495|Dole
USERID2|2500|Francis
USERID2|1500|Francis
);
####
$ perl bench_inside_outside.pl
Rate outside outside2 inside inside2
outside 110902/s -- -2% -39% -40%
outside2 113390/s 2% -- -38% -39%
inside 181595/s 64% 60% -- -2%
inside2 186121/s 68% 64% 2% --