You must be invoking the wrong script or something after adding strict and warnings if you're getting no errors or warnings. I assure you it's not because I didn't have the full script.
I've written you a very small sample script that at least shows you how you can make your code cross-platform compatible... it runs for me on either Unix or Windows systems without any changes. Modify the $dir paths to your environment and try it to see what happens.
#!/usr/bin/env perl use warnings; use strict; use File::Find; my $dir; if ($^O eq 'MSWin32'){ $dir = "c:\\users\\steve\\devel\\repos"; } else { $dir = "/home/steve/devel/repos"; } find({ wanted => \&do_file, no_chdir => 1 }, $dir); sub do_file { my $file = $File::Find::name; if (! -f $file){ return; } print "$file\n"; }
-stevieb
In reply to Re^5: Perl Script in Windows Works, but not in Unix
by stevieb
in thread Perl Script in Windows Works, but not in Unix
by dobster936
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |