Displaying keyword search results 1 - 2
Created by Dr. Xi on June 20, 2011 15:18:06 Last update: June 20, 2011 15:18:06
Perl does not have built-in functions to get the base name or dir name from a file path. But on the Unix platforms we can rely on the executables basename and dirname .
#!/usr/bin/perl $f = '/A path with/space "/file...The quotes, escapes, and chomp are necessary:
# This fails when there's a space in $f $base =...