I need to write a program which will print out all file/directory names in the directory given
So a sample invocation of a perl script pscript would be
pscript /usr/local
And it would out the file/directory names in /usr/local
I'm new to perl, could someone explain to me exactly how this works
my($directory, $filename) = $text =~ m/(.*\/)(.*)$/;
print "D=$directory, F=$filename\n";
The first line is the confusing line, how does the grep line work and then pass it along to $text and my($directory, $filename).
Also...
I need to write a program which will print out all file/directory names in the directory given
So a sample invocation of a perl script pscript would be
pscript /usr/local
And it would out the file/directory names in /usr/local
I'm new to perl, could someone explain to me exactly how this works
my($directory, $filename) = $text =~ m/(.*\/)(.*)$/;
print "D=$directory, F=$filename\n";
The first line is the confusing line, how does the grep line work and then pass it along to $text and my($directory, $filename).
Also...
I need to write a program which will print out all file/directory names in the directory given
So a sample invocation of a perl script pscript would be
pscript /usr/local
And it would out the file/directory names in /usr/local
I need to write a program which will print out all file/directory names in the directory given
So a sample invocation of a perl script pscript would be
pscript /usr/local
And it would out the file/directory names in /usr/local
I'm new to perl, could someone explain to me exactly how this works
my($directory, $filename) = $text =~ m/(.*\/)(.*)$/;
print "D=$directory, F=$filename\n";
The first line is the confusing line, how does the grep line work and then pass it along to $text and my($directory, $filename).
Also...
I need to write a program which will print out all file/directory names in the directory given
So a sample invocation of a perl script pscript would be
pscript /usr/local
And it would out the file/directory names in /usr/local
I'm new to perl, could someone explain to me exactly how this works
my($directory, $filename) = $text =~ m/(.*\/)(.*)$/;
print "D=$directory, F=$filename\n";
The first line is the confusing line, how does the grep line work and then pass it along to $text and my($directory, $filename).