reading an integer value from file?

2005-02-05 Thread pablo wablo
I'm trying to parse an avi header and I'm having problems getting the actual values of the integer data in the file. Here's what I do: open(INHANDLE, "tesmovie.avi.mp3") || die("can't open file"); my $line = ; my $datarate = substr($line, 4, 4) - 0; print "$datarate\n"; What I'm trying to do

RE: Search And Replace

2005-01-07 Thread pablo wablo
sorry sent it out ot the list if it's just V you want to replace you can try $something =~ s/V/v/g; --- "Adamiec, Larry" <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: William Black [mailto:[EMAIL PROTECTED] > > > Sent: Friday, January 07, 2005 08:42 > > To: begi

Re: Trouble with compound regular expression matching

2004-12-06 Thread pablo wablo
note that I only used a pair of //... --- pablo wablo <[EMAIL PROTECTED]> wrote: > > --- Jeffrey Paul Burger <[EMAIL PROTECTED]> wrote: > > > I tried everything I could think of to get this to > > work before pleading for > > help! > > > >

Re: Trouble with compound regular expression matching

2004-12-06 Thread pablo wablo
--- Jeffrey Paul Burger <[EMAIL PROTECTED]> wrote: > I tried everything I could think of to get this to > work before pleading for > help! > > I need to check if a file is either a TIFF or JPEG > graphics file. > (Case-insensitive variations of qualifying suffixes > would be .tif, .tiff, > .jpg

built-in switch statement?

2004-12-06 Thread pablo wablo
I'm just wondering what is the reason that switch is not built-in in perl... I can do a switch statement by using the Switch module, but I'm wondering why it's not already builtin with the interpreter. thanks __ Do You Yahoo!? Tired of spam? Yahoo

How's a simpler way to do this? (pattern)

2004-12-04 Thread pablo wablo
Hello, I'm new to perl. I'm trying a regular expression that accepts register format for assembly. (r0 - r31) I have this regexp $in =~ /\b[rR] ( ([0-9]) | ( [12][0-9] ) | ( 3[01] ))\b/x; it works fine but I'm not satisfied with it.. (too long!) I have something in mind but I dont know th