Re: Does Perl have "Case" Statements?

2002-02-28 Thread sachin balsekar
= 1, last SWITCH if /^abc/; $def = 1, last SWITCH if /^def/; $xyz = 1, last SWITCH if /^xyz/; $nothing = 1; } hope this helps... regards, sachin balsekar. Chris wrote: > I have been looking in the Learning Perl book, and cannot find it. > > I am sur

Reading HTML Files for Data.

2002-02-25 Thread sachin balsekar
Hi ppl, I have one HTML file per News story...i got to fetch some data (first few lines) out from a HTML file and display it as an abstract for the said story... The HTML file have the following issues... 1. There could be a HTML table at the very beginning..(can i strip out the whole table..i

Reading HTML Files for Data.

2002-02-25 Thread sachin balsekar
Hi ppl, I have one HTML file per News story...i got to fetch some data (first few lines) out from a HTML file and display it as an abstract for the said story... The HTML file have the following issues... 1. There could be a HTML table at the very beginning..(can i strip out the whole table.

Re: php and perl

2002-02-24 Thread sachin balsekar
, Sachin Balsekar.. /** There's always more than one way to do something.. **/ Joyce Harris wrote: > I have a php form and I need to do some data validation either before > inserting data into the database or comparing data in a textfield to > data in the database. It seems li

Re: time question

2002-02-04 Thread sachin balsekar
Hi, Theres a function stat() that returns a list of file / dir parameters.. ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks)= stat($filename); may be that cud help...check it out... regs, sachin balsekar. Nisim, Amit wrote: >Hi All, > >How ca

Re: Another simple question

2002-02-04 Thread sachin balsekar
e, or true, if the pattern is found in the string...0, or false, if the pattern is not matched to ignore case... if($var =~ /$searchStr/i) hope this solves u r query.. regs, sachin balsekar. Daniel Falkenberg wrote: >Hey All, > >I have a string here that may/maynot containg the word

Re: simple question

2002-02-04 Thread sachin balsekar
hi, possibly u cud have a scalar containing 20 spaces...and search and replace... whas say ?? regs, sachin balsekar. Stuart Clark wrote: >How do I replace the letter M with 20 spaces. > >s/M/\s[20]/; # dosen't seem to work :-( > >Regards >Stuart Clark > >

Re: Using =~ with a list

2002-02-04 Thread sachin balsekar
egs, sachin balsekar. Lysander wrote: >I need to replace all the occurances of one thing with another. This is simple >enough, except that I am working with a list variable, rather than a scalar. > >@body =~ s/foo/bar/; > >give an error and > > for my $body (@body) &

Re: decimal point

2002-01-28 Thread sachin balsekar
in between... hope this helps... regs, sachin balsekar. Stuart Clark wrote: >Hi, >I am trying to move the decimal point 2 places to the the left. > >Eg : To make 4536233 into 45362.33 > >I tried this >$total = "4536233"; >$total = sprintf("%0.2f&quo

Re: chdir problem

2002-01-27 Thread sachin balsekar
regs, sachin balsekar. Dhiraj P Nilange wrote: >Hello. >I have Windows98. I wrote a >small script just to change >directory. > >$a=chdir("bin"); >print $a; > > >this script prints 1. So chdir returned >true after success. But in reality >directory i

Re: cronjob problem

2002-01-22 Thread sachin balsekar
ourself >using some script... > >something like > >* * * * * script >> logfile 2>&1 & > >in the end of the cron u cud get u r mailing script called in ... > >this shud also take care of errors in the cron ( i mean the scrip >entered in the crontab not a

Re: cronjob problem

2002-01-21 Thread sachin balsekar
scrip entered in the crontab not available)... regs, sachin balsekar. Rahul Garg wrote: >Hello, >I am running crontab command. > I want the output of commands in crontab file to be mailed to me. > For that I am setting the MAILTO environment variable at the beginning > of crontab

Re: local() vs. my()

2002-01-21 Thread sachin balsekar
hi, may be this would help... http://perl.about.com/library/weekly/aa022801a.htm ciao, sachin balsekar. Stefan Kredler wrote: >can anyone explain the difference between my() and >local() ? > >The manual says that I usually want to use my() but >what exactly happens to a varia

Re: Scrolling text box placing carrige returns in text file.

2002-01-20 Thread sachin balsekar
r doubts... regs, sachin balsekar. Daniel Falkenberg wrote: >Hey All, > >I have just created a perl/cgi program that contains a scrolling text >box. This text box will grab a small text file from a DIR and placed >this text file in the HTML scrolling text file. A user is now abl

Re: Scrolling text box placing carrige returns in text file.

2002-01-20 Thread sachin balsekar
r doubts... regs, sachin balsekar. Daniel Falkenberg wrote: >Hey All, > >I have just created a perl/cgi program that contains a scrolling text >box. This text box will grab a small text file from a DIR and placed >this text file in the HTML scrolling text file. A user is now abl