[Chicago-talk] anyone work with perl2exe ??

Walter Torres walter at torres.ws
Tue Oct 14 00:28:20 CDT 2003

I have a fairly simple script (for the most part).

It takes in cmd line parameters, pulls them apart, makes decisions based
upon them and then runs a function.

   > cleaner /my/dir/*.log -o /my/other/dir/

This will...

  - open MY/DIR
  - parse out all the files matching the wildcard
  - loop though returned list
    - build a new result file name
    - parse original file
    - spit results into new file
    - loop it for another

This is not rocket science!

This works just fine as a script.

But it fails as an EXE!

I walk down the generated list, thus...

  # ------------------------
  # Walk down each file in turn
  # $logFiles can contain a single or multiple files
  for ( sort @logFiles )
    &slurp_n_split ( $_);

I process like this...

  sub slurp_n_split
    # Pick next file off list
    $current_file = shift;

    ... lots of other stuff ...

    # Pull log file apart for future use
    my ($logFileName, $logFilePath, $logFileExt) = fileparse($current_file,

    # build secondary file
	$secondaryFile = $newDir . $logFileName . $logFileExt;

    # Open temp result file, if we can
    open( TEMP, ">$secondaryFile");

    # see if we got an error on this open attempt
       # Send error message to log file
       &to_log("TMP ERR: $$r_cmd_hash{'r'} $!");

       # Jump to next file in list

    ... lots of other stuff ...


This fails at the open(TEMP... line on the second and subsequent files in

It generates this err...

          TMP ERR: /my/other/dir/ex030932.in.log No such file or directory

Funny thing is, it does create the TEMP file in the secondary directory then
it throws the error.

Works fine as a script.

I've spent the better part of the last 3 days on this. Re-wrote a lot of
code to find where the problem was.

Anyone have any ideas?



More information about the Chicago-talk mailing list