~/test$ perl -le '$var = "blah"; $var =~ /^(....)$/; print $1' blah