$ perl -wle 'print +(split /#/, "a#b")[1];' b #### my (undef, $a) = split ...