[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [MacPerl] parsing postscript



exactly.  either using a freeware hex editor ie, Hexedit (for mac) open the
file and visually see the hex values after 5.4 RY, or write a perl program
that can convert each character of a string into printable hexadecimal
characters using 'sprintf' (sorry i don't remember the exact syntax to do
this.)

> -----Original Message-----
> From:	rjk@linguist.dartmouth.edu [SMTP:rjk@linguist.dartmouth.edu]
> Sent:	Tuesday, March 02, 1999 9:03 AM
> To:	macperl@macperl.org
> Cc:	john@dwx.com
> Subject:	Re: [MacPerl] parsing postscript
> 
> John Gilmore-Baldwin wrote:
> > 
> > I'm trying to parse through a postscript file, and having some
> difficulty.
> > 
> > I'm using long line enders, like so:
> > 
> > $/ = "5.4 RY";
> > 
> > My problem comes in when, in the above example, I change the line to:
> > 
> > $/ = "5.4 RY\x0D";
> > 
> > Now, this never matches and reads the rest of the file in. Bummer.  If I
> > read in through the 5.4 RY, then reset $/ to "\x0D", I can get to where
> I
> > want.  I have verified that the line ends with RY followed by a carriage
> > return.
> > 
> 
> How have you verified this?
> 
> If the whole file is read in, it must be because the string "5.4 RY\x0D"
> does not appear.
> 
> Ronald
> 
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
> 
>