On Wed, 2008-09-03 at 16:47 +0100, brian54321uk wrote:
> Just tested this out and unfortunately instead of dirname replacing
> abc123, I get a .
That's because the dirname is a '.'
Try:
use Cwd;
if( (my $dir = dirname( $file )) eq '.' ){
$dir = cwd();
}
--
Just my 0.00000002 million dollars worth,
Shawn
"Where there's duct tape, there's hope."
Cross Time Cafe
"Perl is the duct tape of the Internet."
Hassan Schroeder, Sun's first webmaster
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/