I think what ur asking is why does this work under Cygwin but not under
Eclipse? Or vice versa? It all depends on what "shell like thing" the ``
command is being filtered through.
Cygwin paths and Windows paths are not interchangable. If u run it under
Cygwin the paths will be like /c/perl/perl.exe and find can grok that and do
something useful. But under Windows that path is C:\perl\perl.exe, which
find will choke on if invoked under a unix like shell. The find command
will see C:perlperl.exe. U have to double the backslashes or convert them
to forward slashes to keep shell translation from destorying ur command line.
[attic:/d/backups]$ find d:\backups
find: `d:backups': No such file or directory
At 02:45 PM 9/10/2008 +1200, Jing LI wrote:
>I have one Perl script which works when executing it directly in Cygwin
>window.
>
>It uses find to find a type of file in a directory and its subdirectories:
>
>my @jarfiles = split(' ',`find $bin_location -name "*.jar"`);
>
>But when run or debug it in Eclipse, it has error:
>sh: find: No such file or directory.
>
>I have set the Perl interpreter in Eclipse->Window->Preferences->perl EPIC.
>
>The scripts I work on work fine on linux, and I tested it works find in
>Cygwin. I really want to know how to run it in Eclipse+EPIC+cygwin as it
>allows me to debug the perl scripts.
--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"
00000100
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs