Hello All, Working on a "load" type function for sql files.
This is a quote from perldoc File::Basename "You are guaranteed that if you concatenate path, name, and suffix together in that order, the result will denote the same file as the input file specification." However, what I'm seeing with perl 5.6.1 is this: perl -w quickfind.pl lib/myview.sql myview.sql /tmp/myview.sql ./myview.sql 1. file lib/myview.sql : concat lib/myview.sql 2. file myview.sql : concat ./myview.sql 3. file /tmp/myview.sql : concat /tmp/myview.sql 4. file ./myview.sql : concat ./myview.sql 2 is now wrong. The current path "./" was added as a default. Is this a bug, feature, or done for security? (numbers added for reference only) # ... snip foreach my $file (@ARGV) { look_for($file); } exit; sub look_for { my $file = shift; my ($base, $dir, $ext) = fileparse($file,'\..*?'); print "file $file : concat $dir$base$ext\n"; # ... snip return; } What I'm attempting to do is determine if the user has call the "load" function with a file name that contains a path. If no path, then look for the file in the environment PATH variable. Thanks, Tom _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]