in reply to Re^2: perlApp --gui and chdir
in thread perlApp --gui and chdir

If you're using an absolute path, what has chdir got to do with it?

I'll bet you're not doing any error checking either, open can fail you know

Replies are listed 'Best First'.
Re^4: perlApp --gui and chdir
by diamondsandperls (Beadle) on Jul 01, 2012 at 22:11 UTC
    all works fine as a .pl so error checking has nothing to do with this

      all works fine as a .pl

      Prove it.

      so error checking has nothing to do with this

      Sure it does.

        my apologies yes error checking on path would help the problem is after compiling finding the current user is failing

        my $olduserid = qx{whoami};
        chomp $olduserid;
        my ($userid) = $olduserid =~ /.*\\(\w+)/;

        my $path = "C:/Users/$userid/Desktop/";

        open to recommendations to determine current user bc after compiling my code is failing on path.