Re: CGI.pm questions

2001-11-18 Thread Scott R. Godin
In article <3827643.100599@[10.0.0.140]>, [EMAIL PROTECTED] (Birgit Kellner) wrote: > I want to use CGI.pm to parse form input and store all name/value-pairs in > a hash. > > At present, the code I have reads like this: > > my $in = new CGI; > my %in = &parse_form; > > sub parse_form { >

Re: PERL Debugging

2001-11-18 Thread Scott R. Godin
In article <005301c16fae$563b3d00$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Sherri) wrote: > Can anyone please tell me what this error means: > > syntax error `(' unexpected > > Is it that I am not supposed to be using "(" ever in my programs, because > almost everytime I have a program that nee

pattern matching

2001-11-18 Thread Prasanthi Tenneti
Hi, Iam a beginner in perl.I have one question, Iam trying to write one prog,in which i have to search for one word in a file, If I found that word,print next 4 lines. PLs help me,how to write code. cheers, prasa. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

Re: pattern matching

2001-11-18 Thread Andrea Holstein
Prasanthi Tenneti wrote: > > Iam a beginner in perl.I have one question, > Iam trying to write one prog,in which i have to search for one word in a > file, > If I found that word,print next 4 lines. > PLs help me,how to write code. open FILE, ") { print(,,,), last if /your_word/; } close

Re: pattern matching

2001-11-18 Thread John W. Krahn
Andrea Holstein wrote: > > Prasanthi Tenneti wrote: > > > > Iam a beginner in perl.I have one question, > > Iam trying to write one prog,in which i have to search for one word in a > > file, > > If I found that word,print next 4 lines. > > PLs help me,how to write code. > > open FILE, " while ()

Re: pattern matching

2001-11-18 Thread Leon
- Original Message - From: "Prasanthi Tenneti" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> > Hi, > Iam a beginner in perl.I have one question, > Iam trying to write one prog,in which i have to search for one word in a > file, > If I found that word,print next 4 lines. > PLs help me,how t

Re: pattern matching

2001-11-18 Thread Daniel Gardner
PT> Hi, PT> Iam a beginner in perl.I have one question, PT> Iam trying to write one prog,in which i have to search for one word in a PT> file, PT> If I found that word,print next 4 lines. PT> PLs help me,how to write code. PT> cheers, PT> prasa. something like this should do the trick: open FIL

Re: capture strings with two non-identical capital letters in a row

2001-11-18 Thread Michael Fowler
On Fri, Nov 16, 2001 at 10:39:57PM +0100, birgit kellner wrote: > How can I filter out strings which contain two (or three) non-identical > capital letters in a row? > > my $string1 = "ABCD"; > my $string2 = "AbCd"; > my $string3 = "AABcD"; > > Get $string1, discard $string2 and $string2. The

Re: pattern matching

2001-11-18 Thread Jim Conner
At 19:01 11.18.2001 -0800, John W. Krahn wrote: >Andrea Holstein wrote: > > > > Prasanthi Tenneti wrote: > > > > > > Iam a beginner in perl.I have one question, > > > Iam trying to write one prog,in which i have to search for one word in a > > > file, > > > If I found that word,print next 4 lines.

Re: NT logon scripts

2001-11-18 Thread Hamish Kibblewhite
Erwin Blonk wrote: >can someone recommond a book on Perl that helps me writing NT-logon scripts. I have purchased Win32 Perl Scripting by Dave Roth and have found it to be worth buying. The title of Chapter 6 is "Logon scripts" and has useful example code. From memory the appendix details how to

Re: pattern matching

2001-11-18 Thread nafiseh saberi
hi. you can find that code in www.perl.com I know it ,but I am not fresh now... the time in IRAN is 9p.m, and I am at work from 9 a.m to 3 p.m, and my id is [EMAIL PROTECTED] (with yahoo mesenfer) ,I am online in that time. if your problem resist,please contact with me to help you more. I have

Re: pattern matching

2001-11-18 Thread John W. Krahn
Jim Conner wrote: > > At 19:01 11.18.2001 -0800, John W. Krahn wrote: > >Andrea Holstein wrote: > > > > > > Prasanthi Tenneti wrote: > > > > > > > > Iam a beginner in perl.I have one question, > > > > Iam trying to write one prog,in which i have to search for one word in a > > > > file, > > > > I

Re: sub-routine help needed.

2001-11-18 Thread Jeff 'japhy' Pinyan
On Nov 17, John W. Krahn said: >You might have a problem with this if there are any characters in $match >that are special to regular expressions or $match is a sub-set of the >array element so use either: > >my @filtered = grep /^\Q$match$/i, @array; > >Or: > >my @filtered = grep $_ eq $match, @

Re: pattern matching

2001-11-18 Thread Jeff 'japhy' Pinyan
On Nov 18, Andrea Holstein said: >> Iam a beginner in perl.I have one question, >> Iam trying to write one prog,in which i have to search for one word in a >> file, >> If I found that word,print next 4 lines. >> PLs help me,how to write code. > >open FILE, "while () { > print(,,,), last if

Re: pattern matching

2001-11-18 Thread Michael Fowler
On Sun, Nov 18, 2001 at 08:53:59PM +0100, Andrea Holstein wrote: > open FILE, " while () { > print(,,,), last if /your_word/; > } > close FILE; This would not do what you expect. in list context reads all of the lines in the given file, and print imparts list context to its arguments. Wh

RE: capture strings with two non-identical capital letters in a row

2001-11-18 Thread Wagner-David
If you look at his original email, if any small letters, don't want and if mutliple Capital letters in a row, don't want either only capital letters which do not have two or more in a row of same character. SO ABCD is ok, but ABcD fails on small letter. ABBCD fails on 2 B's together.

Re: sub-routine help needed.

2001-11-18 Thread John W. Krahn
[posted and e-mailed] Jeff 'Japhy' Pinyan wrote: > > Ok, here's my regex-vs-eq rant. > > [snip] I know that beginners post and e-mail their replies without any indication but I expected better of you. :-( John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED]