>>>>> "SHC" == Shawn H Corey <[email protected]> writes:

  SHC> On 11-05-08 09:29 AM, [email protected] wrote:
  >> opendir(DIR, "$path") || die "folder not found" $!;

  SHC> If you are checking if the folder exists, use the -d file test:

  SHC> if( -d $path ){
  SHC>   print "The folder $path exists\n";
  SHC> }else{
  SHC>   print "Sorry, not path to $path\n";
  SHC> }

that doesn't tell use any more than his call to opendir failing did. we
know it isn't a legal dir from his code so he needs to see why which is
what $! tells him. he didn't tell us what $! says which i asked him to
do.

uri

-- 
Uri Guttman  ------  [email protected]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to