The Roopak Times wrote:
> Hi All

Hello,

>  As i was continuing with perl i created a program to churn out individual
> directory names from a given path in windows.Here is the program:
>  #use warnings;
> #use strict;
>  Print "Enter the path:";
> my $dir=<STDIN>;
> chomp($dir);
> my @DIR=split ///, $dir;
> print $DIR[0];
>  but it throws an error "Search pattern not terminated"
> Plz help.

$ perl -le'
use File::Spec;
print for File::Spec->splitdir( "some/dir/to/look/for/files" );
'
some
dir
to
look
for
files



John
-- 
use Perl;
program
fulfillment

-- 
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