Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: exe with wx gui - pp/wxpar issues

by Anonymous Monk
on Apr 07, 2011 at 15:10 UTC ( #898085=note: print w/replies, xml ) Need Help??

in reply to Re^2: exe with wx gui - pp/wxpar issues
in thread exe with wx gui - pp/wxpar issues

problem one, covered in PAR::FAQ
Problem two
$source_path = win_path($source_path); $destination_path = win_path($destination_path); if (!$destination_path) { $destination_path = $source_path; } my @files = <$source_path\\*>; my %seen; my $search = 'while (<>) { study;'; $search .= "++\$seen{\$ARGV} if /\\b_$project_id\\b/;\n"; $search .= "}"; @ARGV = @files; undef $/; eval $search; $/ = "\n";
Don't use string eval, especially for something like that. That should be a single function call, see qr, quotemeta, local

Replies are listed 'Best First'.
Re^4: exe with wx gui - pp/wxpar issues
by jhoop (Acolyte) on Apr 07, 2011 at 15:27 UTC
    Thanks, I will adjust. I did come across the unless(caller) issue last night and commented out the line, but received the same errors from the exe after running wxpar. Is that eval the likely source of my problem? Why the attempt to access all those other directories, when $source_path is clearly defined?

    Update: I changed the way I was digging through the source directory, and it cleared up my problem. However, I still don't understand why the use of eval in that way was causing the trouble.. thanks though.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://898085]
and the grasshoppers chirp...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2018-06-25 11:06 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.