in reply to Playing with code found on Perlmonks
This could be rewritten:
fname=`echo $fname|sed 's/~/\/home\/ben/g'`
Perhaps:
fname=`echo $fname|perl -pe "s#~#$HOME#g"`
In Section
Cool Uses for Perl
in reply to Playing with code found on Perlmonks
This could be rewritten:
fname=`echo $fname|sed 's/~/\/home\/ben/g'`
Perhaps:
fname=`echo $fname|perl -pe "s#~#$HOME#g"`