Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. use strict;
  2. use warnings;
  3. #only linux
  4. #use diagnostics;
  5.  
  6. # - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - -
  7. sub in_function {
  8. my $file = shift;
  9.  
  10. glob($file) or die ("$file file was not foundn"); #this fails second time called
  11.  
  12. # this is ok second time called
  13. #my @dummy = glob($file) or die ("$file file was not foundn");
  14. }
  15. # - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - -
  16. my $file = "/tmp/file1*.pdf";
  17. glob($file) or die ("$file file was not foundn");
  18. in_function($file);
  19. $file = "/tmp/file2*.pdf";
  20. glob($file) or die ("$file file was not foundn");
  21. in_function($file);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement