in reply to Re: Getting utf8::SWASHGET when using MIME::Tools
in thread Getting utf8::SWASHGET when using MIME::Tools

Thanks you so much, unfortunately as I develop on a company product (that uses perl scripts) that must be compatible with the customer's environment, I don't think it will be possible to upgrade to a later version

However, I accidentally managed to get that script to work by running it as bash$ perl script.pl instead of bash$ ./script.pl. Really bizarre but I guess something to be aware of :)

Thanks for providing some background on my issue and I'll keep in mind your points on the way Perl 5.8 handles utf encoding if I come across a more persistent similar issue.

Replies are listed 'Best First'.
Re^3: Getting utf8::SWASHGET when using MIME::Tools
by MidLifeXis (Monsignor) on Jun 05, 2012 at 13:47 UTC

    Check your shebang line then. The perl being specified on the first line of your script (#!/path/to/perl) is not the first one in your path (which perl). Two different interpreters are being used, generating the different results.

    --MidLifeXis

      Wow, spot on! I typed as a shebang the address from bash$ which perl and it ran flawlessly, however using the old shebang (#!/usr/bin/perl) it would give me that issue.

      Thanks very much for that, it kind of slipped my mind that naturally the latest version of perl might not necessarily be found in the usual place that I'd look in, normally I'd leave that to the software running the perl scripts and would just use the standard old when I'm writing them initially. Up until now, I hadn't experienced any issues.

      Thank you all, I think that pretty much concludes it :)