in reply to attach a prefix to a filename
If you know you're not going to be changing platforms or needing the flexibility of a directory path splitter that handles different directory seperator characters (i.e. \ on Windows and / on Unix etc) and just want something fast and simple you could use something like this instead:
my $tempvalue = "c:/reports/check/test.txt"; my @split = split( '/', $tempvalue ); my $file = pop @split; print "\t", join( '/', @split ), "/design.$file\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: attach a prefix to a filename
by polettix (Vicar) on Jan 03, 2006 at 13:18 UTC |