Thanks for the various suggestions. Do I feel stupid or what ???

I've just slept on the issue and noticed an unqualified 'exit;' command in
the script. It was getting late when we were talking others through
debugging it and thought it was finishing because $file was undefined.

Obviously it's a slightly different version than the one which worked on
Windows - but how I don't know. I'll take the exit out and see what happens
:)

I'll also add 'i' to do case insensitive matching on the output type.

Thanks again,
Tim

----- Original Message -----
From: "Peter Prymmer" <[EMAIL PROTECTED]>
To: "Tim Scott" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 8:56 PM
Subject: Re: Perl "porting" problem


>
>
> 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
>
>
>

Reply via email to