On Wed, 28 Mar 2001, Tim Scott wrote:
> Help!!!
>
> This script works on Windows fine, but doesn't produce ANY output of ANY
> sort on VMS.
>
> Can anyone suggest why ?
>
> Thanks - I'm getting desperate :(
With just a quick look at the script it looks like this portion
could lead to trouble on VMS:
foreach(@ARGV)
{
# Get output type
/^(ERROR|WARNING|LOG)/ && do { $ot = $_; };
Try running the following script on VMS and note that owing to the C RTL's
downcasing of argv[] values what happens to the script arguments:
$ type argv.t
foreach(@ARGV) { print }
$ perl argv.t first second THIRD "FOURTH"
firstsecondthirdFOURTH
Note that perl on windows does not downcase its arguments. Workarounds
include the "QUOTATION" of args with caps including "MiXed_CaSe"
arguments, explicitly making the regexp insensitive:
/^(ERROR|WARNING|LOG)/i && do { $ot = $_; };
or making it lower case sensitive only on one platform:
if ($^O eq 'VMS') {
/^(error|warning|log)/ && do { $ot = $_; };
}
else {
/^(ERROR|WARNING|LOG)/ && do { $ot = $_; };
}
I hope that helps. There could be other matters - I presume that you have
DBI and DBD::* installed OK on the VMS machine.
Peter Prymmer