Which way is better? (and why)

2007-01-31 Thread M. Lewis
I'm trying to write an interface to check SHA1 or SHA256 checksums of a file. Initially I was thinking of opening the checksum file and figuring out based on the contents of that file, is it a SHA1 checksum or a SHA256 checksum. I realize it would be 'easier' to pass as an argument to the scrip

Re: while loop problem

2007-01-31 Thread John W. Krahn
Brad Cahoon wrote: > Hi Perl Masters Hello, > I have a problem with a script which is suposed to open a huge text > file and take 70 lines, create a file, then take the next 70 lines > create a file and so on until it has parsed the whole file. My code > just doesn't work and my brain cannot figu

Validating XML against XSD

2007-01-31 Thread Ashok Varma
Hi, I have XSD, XML files and want to validate the XML against the XSD and then only proceed with parsing the XML file. I used XML::SAX::ParserFactory, XML::Validator::Schema modules but following is the issues i faced ... 1. Failed with this reason --- elementFormDefault in must be 'unqualifie

Re: while loop problem

2007-01-31 Thread Rob Dixon
Brad Cahoon wrote: Hi Perl Masters I have a problem with a script which is suposed to open a huge text file and take 70 lines, create a file, then take the next 70 lines create a file and so on until it has parsed the whole file. My code just doesn't work and my brain cannot figure out while{whi

RE: while loop problem

2007-01-31 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Brad Cahoon wrote: > Hi Perl Masters > > I have a problem with a script which is suposed to open a huge text > file and take 70 lines, create a file, then take the next 70 lines > create a file and so on until it has parsed the whole file. My code > just doesn't work and my brain cannot figure out

while loop problem

2007-01-31 Thread Brad Cahoon
Hi Perl Masters I have a problem with a script which is suposed to open a huge text file and take 70 lines, create a file, then take the next 70 lines create a file and so on until it has parsed the whole file. My code just doesn't work and my brain cannot figure out while{while{}} loops Help ple

Re: regexp

2007-01-31 Thread oryann9
"John W. Krahn" <[EMAIL PROTECTED]> wrote:oryann9 wrote: > In this regexp > > my $regexp = qr/(\d+\x3a1108 > |\w+\x3a1108{1,} ) /; > > vs. > > my $regexp1 = qr/(\d+\x3a1108 > |\w+\x3a1108){1,} /; > > does the {1,} construct outside the parens () mean the entire string 1 > or more times an

Re: regexp

2007-01-31 Thread John W. Krahn
oryann9 wrote: > In this regexp > > my $regexp = qr/(\d+\x3a1108 > |\w+\x3a1108{1,} ) /; > > vs. > > my $regexp1 = qr/(\d+\x3a1108 > |\w+\x3a1108){1,} /; > > does the {1,} construct outside the parens () mean the entire string 1 > or more times and within the parens me

Re: url encode

2007-01-31 Thread Tom Phoenix
On 1/31/07, Tatiana Lloret Iglesias <[EMAIL PROTECTED]> wrote: i'm trying to get this url but i get an error: What error? my $response = $ua->get($url); What's $ua? If it's an LWP::UserAgent object, that should be a correct way to use it. Of course, you'll need next to examine the respons

url encode

2007-01-31 Thread Tatiana Lloret Iglesias
Hi, i'm trying to get this url but i get an error: http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.htm&r=1&p=1&f=G&l=50&d=PTXT&S1=%22clear+dead%22&OS=%22clear+dead%22&RS=%22clear+dead%22 my $response = $ua->get($url); how should i encode it? I

Re: regexp

2007-01-31 Thread Rob Coops
Number one will match: \d+\x3a1108 or \w+\x3a1108 at least once Number two will match: (\d+\x3a1108|\w+\x3a1108) at least once so yes the {1,} outside means the whole thing and {1,} inside means only the part after the or (pipe '|' sign) unless my regex skills are completely deserting me af

regexp

2007-01-31 Thread oryann9
In this regexp my $regexp = qr/(\d+\x3a1108 |\w+\x3a1108{1,} ) /; vs. my $regexp1 = qr/(\d+\x3a1108 |\w+\x3a1108){1,} /; does the {1,} construct outside the parens () mean the entire string 1 or more times and within the parens mean only the la