in reply to Re: Re: Referencing string: Can't use string as a SCALAR ref
in thread Referencing string: Can't use string as a SCALAR ref

There is a better way to do it. (Which happens to be Limbic~Region's first suggestion.) As an added bonus, it also makes the code more portable to other OS's (as long as you have the script setup a directory or something rather than hard-coding it.)

use File::Basename; my $file = basename($filestring); print $file,$/;

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1