RE: print file

2006-05-08 Thread Bedanta Bordoloi, Gurgaon
Try this: open(FILE,"f:/file.txt") || print("open() failed as file did not exist.\n"); while (){ print $_; } Bedanta -Original Message- From: badrinath chitrala [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 2:46 PM To: beginners@perl.org Subject: print file Hi open F

RE: Error : Nested quantifiers before HERE mark in regex

2005-11-29 Thread Bedanta Bordoloi, Gurgaon
Thanks, John for that, it works fine now... Bedanta -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 3:25 PM To: Perl Beginners Subject: Re: Error : Nested quantifiers before HERE mark in regex Bedanta Bordoloi, Gurgaon wrote: > Hi

RE: Error : Nested quantifiers before HERE mark in regex

2005-11-29 Thread Bedanta Bordoloi, Gurgaon
regex On Nov 29, 2005, at 10:22, Bedanta Bordoloi, Gurgaon wrote: > Hi All, > > I'm using the following regex in my code with processes a log file > > $str =~ s/(^$log_entry[0]\s)//i > > But I'm getting the following error on running the script: > >

Error : Nested quantifiers before HERE mark in regex

2005-11-29 Thread Bedanta Bordoloi, Gurgaon
Hi All, I'm using the following regex in my code with processes a log file $str =~ s/(^$log_entry[0]\s)//i But I'm getting the following error on running the script: Nested quantifiers before HERE mark in regex m/(^img13.** << HERE **\s)/ Can the regex be written in some other

RE: help about regex matching

2005-11-28 Thread Bedanta Bordoloi, Gurgaon
Hi Jeff, Here's a solution u can have a look at: open(INPUTFILE, "d:/data.log"); open(OUTPUTFILE, ">d:/output.log"); my $last_str = "INIT"; RECORD: while(){ chomp; $str = $_; if ($last_str ne "INIT" && length($str) != 0){ print OUTPUTFILE "$last_str $str\n"

RE: matching pattern & printing

2005-08-17 Thread Bedanta Bordoloi, Gurgaon
Hello, You can simply say while (){ if ($_ =~ /NSTEP/){ print OUT $_; } } Bedanta -Original Message- From: Vineet Pande [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 17, 2005 4:24 PM To: beginners@perl.org Subject: matching pattern & printing Hi:

Oracle function call

2005-04-22 Thread Bedanta Bordoloi, Gurgaon
Disclaimer: This message and any attachment(s) contained here are information that is confidential, proprietary to HCL Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addresse

function call from shell script

2005-04-22 Thread Bedanta Bordoloi, Gurgaon
Disclaimer: This message and any attachment(s) contained here are information that is confidential, proprietary to HCL Technologies and its customers. Contents may be privileged or otherwise protected by law. The information is solely intended for the individual or the entity it is addresse

RE: simple substitution question

2005-02-17 Thread Bedanta Bordoloi, Gurgaon
Hi, If I've understood your problem, what you can simply try is $string = "but"; print "Before: $string "; $string =~ s/u/a/g; print "After: $string\n"; You will get as output $ Before: but After: bat Cheers, Bedanta -Original Message- From: Harold Castro [mailto:[EMAIL PROTECTED]