Hi List,

I have this script which actually returns the value of the filename with
extension but If the file name is something like "c:\projects\text 009.txt"
(having a space in filename which is common in windows).
This script only returns "text" instead of returning full name of file.
Here is the script

  #!/usr/bin/perl
  # file: basename.pl
  use strict;
  use File::Basename;
  my $path = $ARGV[0];
  my $base = basename($path);
  my $dir  = dirname($path);
  print STDOUT $base;

Any help/suggestion will be appreicated.

Thanks a lot.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to