Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Please suggest me a better way of doing this. so the result should look like c:/reports/check/design.test.txt Thanks in advance.my $tempvalue = "c:/reports/check/test.txt"; my @split = split( '/',$tempValue ); $split[$#split] = $/"design.".$1/e; print "\t",join( '/',@split ),"\; \\\n" ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: attach a prefix to a filename
by polettix (Vicar) on Jan 03, 2006 at 09:45 UTC | |
|
Re: attach a prefix to a filename
by prasadbabu (Prior) on Jan 03, 2006 at 09:46 UTC | |
|
Re: attach a prefix to a filename
by Fang (Pilgrim) on Jan 03, 2006 at 09:48 UTC | |
|
Re: attach a prefix to a filename
by serf (Chaplain) on Jan 03, 2006 at 11:05 UTC | |
by polettix (Vicar) on Jan 03, 2006 at 13:18 UTC | |
|
Re: attach a prefix to a filename
by smokemachine (Hermit) on Jan 03, 2006 at 15:31 UTC |