#ex_15-1 #Learning Perl, Appendix A, Exercise 15.1 while (<>) { chop; $slash = rindex($_,"/"); $head = substr($_,0,$slash); $tail = substr($_,$slash+1); print "head = '$head', tail = '$tail'\n"; }