This is exactly the code which bit me on Linux not too long ago:
At 2:49 PM 11/5/03, Thomas R Wyant_III wrote:
$! = 0; # Are you superstitious?
>while (<>) {
># do something useful
>}
>die $! if $!;
Turned out that on the SuSE 8.2 kernel, with Perl 5.8, open was attempting
some ioctl intended for
Robert,
Jump-starting yourself with knowledge of something similar is a tried and
true technique. It's a little harder to make it work with Perl, though,
since Perl is so different. Larry Wall in the Camel Book compares parts of
it to Basic, parts to Fortran, parts to C, and so on. Before I got t
al, but it seems
you have to know the bowls of Perl before you can get going?
Am I being picky, or impatient, and where did that left sock go?
Rob.
-Original Message-
From: Thomas R Wyant_III [mailto:[EMAIL PROTECTED]
Sent: 05 November 2003 19:50
To: [EMAIL PROTECTED]
Subject: RE: File
Craig Berry <[EMAIL PROTECTED]> wrote:
> The reason things work the way Tom describes is that "while
> (<>)" is equivalent to "while ($_ = <>)" and so the loop
> exits whenever $_ is undef.
Minor nit: its equivalent is "while (defined($_ = <>))".
cu,
Martin
--
| Marti
Craig Berry wrote:
> Excellent advice, but often harder to follow than it should be. Think of
trying to explain to a VMS
> newbie why the RMS system services are not to be found in the System
Services Reference
> Manual, the CVT$ routines are in the "RTL Library (LIB$)" even though
they don't be
On Wednesday, November 05, 2003, at 01:49PM, Thomas R Wyant_III <[EMAIL PROTECTED]>
wrote:
>
>Robert Atkinson wrote:
>
>> Remember, you're talking to someone who's used to programming in DCL, which
>> will almost always tell you when it encounters problems. Now I've begun using
>> this 'new' la
Robert Atkinson wrote:
> Remember, you're talking to someone who's used to programming in DCL,
which
> will almost always tell you when it encounters problems. Now I've begun
using
> this 'new' language Perl, I expect it to act similarly. When it doesn't,
I
> need to find out..
> - Why?
> - How
From: Craig Berry [mailto:[EMAIL PROTECTED]
Sent: 04 November 2003 22:23
To: Atkinson, Robert
Cc: [EMAIL PROTECTED]
Subject: RE: File Read Error
On Tuesday, November 04, 2003, at 03:40AM, Atkinson, Robert
<[EMAIL PROTECTED]> wrote:
>Craig,
> can you give me an idea where this
aig A. Berry [mailto:[EMAIL PROTECTED]
>Sent: 03 November 2003 14:21
>To: Atkinson, Robert; [EMAIL PROTECTED]
>Subject: RE: File Read Error
>
>
>At 9:04 AM -0500 11/3/03, Henderson, Jordan (Contractor) (DAASC) wrote:
>>The <> operator just stops on EOF or error.
&g
Craig,
can you give me an idea where this should go in my original code.
Where will Perl jump to if the fails?
Rob.
-Original Message-
From: Craig A. Berry [mailto:[EMAIL PROTECTED]
Sent: 03 November 2003 14:21
To: Atkinson, Robert; [EMAIL PROTECTED]
Subject: RE: File Read Error
ork against you as well... maybe.
>> -Original Message-
>> From: Atkinson, Robert [mailto:[EMAIL PROTECTED]
>> Sent: Monday, November 03, 2003 7:21 AM
>> To: [EMAIL PROTECTED]
>> Subject: File Read Error
>>
>> I am using a bit of Perl script to try an
s the file organization SEQ, REL, or IDX?
Carl
> -Original Message-
> From: Atkinson, Robert [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 03, 2003 7:21 AM
> To: [EMAIL PROTECTED]
> Subject: File Read Error
>
>
> I am using a bit of Perl script to try a
At 9:04 AM -0500 11/3/03, Henderson, Jordan (Contractor) (DAASC) wrote:
>The <> operator just stops on EOF or error.
>
>You have to explicitly access the error codes. Try printing the system variable
>$! at this point.
Or $^E, which should give you the full VMS error message.
--
__
t
to sysopen and sysread or even reading the data in with low-level VMS calls to
really get to the bottom of a problem such as this.
Good luck.
> -Original Message-
> From: Atkinson, Robert [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 03, 2003 7:21 AM
> To: [EMAIL PRO
I am using a bit of Perl script to try and examine a corrupt RMS file.
The file has a few invalid records in it, where the record length exceeds the
maximum record length in the file header.
Although there are a lot more records in the file than reported, the program
seems to stop at the first co
15 matches
Mail list logo