HTML::Parser Tutorial

2005-11-29 Thread Mandar Rahurkar
Hi, Is anyone familiar with a doos tutorial on HTML::Parser module ? Thanks, Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Installing Perl Modules Locally

2005-11-26 Thread Mandar Rahurkar
Hi All, I am trying to install perl modules locally since I dont have a root aceess. I installed a local version of perl. However I am having problems installing modules: ExtUtils::AutoInstall 0.49 required. Install it from CPAN? [Y/n] y *** Installing ExtUtils::AutoInstall Password:

Google API + SOAP

2005-11-26 Thread Mandar Rahurkar
Hi, I am using following script to access Google Api however I get the following error : 502 Bad Gateway at ./googly.pl line 15 . I think the problem is with SOAP::Lite package. Has anyone experience this error before ? Thanks, Mandar #! /ws/ifp-22/scratch/Perl/bin/perl use SOAP::Lite;

RE: Perl on Cygwin

2004-12-12 Thread Mandar Rahurkar
Thank you very much for all your replies. Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl on Cygwin

2004-12-10 Thread Mandar Rahurkar
Hello, Has anyone used perl on windows machine through cygwin ? Is the usability same as that on linux box ? Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

old problem

2004-11-08 Thread Mandar Rahurkar
This was posted some time back by gunnar. How does this exactly work ? Can someone point to help on map ? > my %myNEWhash = >map { $_, delete $myhash{$_} } grep /^1\D/, keys %myhash; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Append on top

2004-10-29 Thread Mandar Rahurkar
TECTED])" <[EMAIL PROTECTED]> >Cc: "Rajesh Dorairajan" <[EMAIL PROTECTED]> > >Does anyone know of a way to open a file in append mode and append on top of >the file? > >Thanks in Advance, > >--Rajesh --- Mandar Rahurkar ECE, UI

Re: RegExp

2004-10-15 Thread Mandar Rahurkar
Thanks Guys this is good however what does character class inside the square brackets mean.. I think I need to get mastering regular expressions book.. Mandar > > while (/(susan[^.?!]+the\s+water\b)/ig) { > print $1,"\n"; > } > > Jenda > = [EMAIL PROTECTED] === ht

RegExp

2004-10-14 Thread Mandar Rahurkar
Hi, I have a bunch of text (multiple paragraphs). I want to find a sentence like 'Susan * the water' (No its not a HW problem). Here's what I am doing: #! /usr/bin/perl use warnings; $file="temp.txt"; open(fp,$file) or die "Cant open $file :$!\n"; local $/=""; while () { while( /(sus

accessing each element

2004-08-16 Thread Mandar Rahurkar
Hi, I have a list , $list=['orange','red','purple']; How do I access each member of $list ? If this had been @list I cud have done, foreach(@list) { print $_; } How does it work for a scalar ? Thanks, Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Cron Tab Implementation

2004-07-08 Thread Mandar Rahurkar
I am not sure why you need perl for this. Just write a perl script which does the job and put the file in crontab. -Mandar On Thu, 8 Jul 2004, NandKishore.Sagi wrote: > Hi All , > > I want to implement the functionality of crontab in Perl. Which > module do you guys suggest can be used.

pattern

2004-06-24 Thread Mandar Rahurkar
Hi All, I need to searh through a text file and lookfor a keyword and print the immediate word following it and before it. for eg., $_="bird was eating fish"; output for keyword eating shd be: was eating fish this is what i am doing, $key="dog"; @sspace=`cat file.txt`; foreach(@sspace)

RE: Regexp

2004-06-19 Thread Mandar Rahurkar
Hi, I am too old to have homeworks on perl :) I tried for the first case: s/\ws\b/$1/; but trick to understand is that I need to substitute forests with forest. I can probably use substr however was looking for a elegant solution. Mandar On Sat, 19 Jun 2004, Tim Johnson wrote: > > This so

Regexp

2004-06-19 Thread Mandar Rahurkar
Hi All, what wud be the regexp for : 1. substituting last s of every word e.g., forests become forest, goats becomes goat 2. removing all one and two lettered words e.g., a,an Thanks, Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Time

2004-06-15 Thread Mandar Rahurkar
Hello All, I was wondering if there any module in perl which will let me add dates taking care of all the complications (i.e.,) if day is greater than 30 change month and so on. Thanks, Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

weird

2004-06-14 Thread Mandar Rahurkar
Hi, I have attached my routine and its output. I dont understand the output differemce between the @subj and $subjectno ? Why do I lose the trailing zeros ? Thanks Mandar @subj= cat somefile.txt print @subj; foreach (@subj) { $subject_no=chomp($_); print $subject_no,"\n"; }

regular expression

2004-06-09 Thread Mandar Rahurkar
Hi, I am looking for URL's that end in .html OR .htm or / if($URL =~ /[.html$|.htm$|\/$]/) { #do somthing } whats wrong with the above expression ? Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: splitting with special characters

2004-06-03 Thread Mandar Rahurkar
#x27; >[ abcde ] >[ fghi ] > >I suspect something else is going on you're not telling us about. > >James > > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] ><http://learn.perl.org/> <http://l

regular expression (made more clearer)

2004-05-28 Thread Mandar Rahurkar
rcase s/^[a-z0-9]+/ /; # substitute all non alphabets and numbers by space s/\s+/ /g; # removes trailing spaces } --- --- Mandar Rahurkar ECE, UIUC --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

regular expression

2004-05-28 Thread Mandar Rahurkar
,$file) or die "Cant open $file :$!\n"; @cont=; [EMAIL PROTECTED]; for(@cont) { tr/A-Z/a-z/; s/^[a-z0-9]/ /; s/\s+/ /g; } --- ------- Mandar Rahurkar ECE, UIUC --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re: String issue?

2004-05-24 Thread Mandar Rahurkar
do I get this echo'd value as a string value? I will be splitting this >string up into segments to fill my fields in my database table. > >Regards >Otto > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] ><http://le

Re: Net::Google

2004-05-21 Thread Mandar Rahurkar
How do I make a force install using mcpan ? Thanks Mandar Original message >Date: Fri, 21 May 2004 15:04:10 +1000 (EST) >From: Owen Cook <[EMAIL PROTECTED]> >Subject: Re: Net::Google >To: [EMAIL PROTECTED] > > >On Thu, 20 May 2004, Mandar Rahurkar wrote:

Net::Google

2004-05-20 Thread Mandar Rahurkar
wrong ?? :( Mandar --- Mandar Rahurkar ECE, UIUC --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: regular expression

2002-10-18 Thread Mandar Rahurkar
thanks for your prompt reply...however this does not work.. program does not generate any output... -Mandar On Thu, 17 Oct 2002, Jeff 'japhy' Pinyan wrote: > On Oct 17, Mandar Rahurkar said: > > >Hi, > > I am trying to write a regular expresssion which reads as : &

Re: regular expression

2002-10-18 Thread Mandar Rahurkar
On Thu, 17 Oct 2002, Jeff 'japhy' Pinyan wrote: > On Oct 17, Mandar Rahurkar said: > > >> >> @new = grep { ! /^$no/ } @list; > >> >> @new = grep !/^\Q$no/, @list; > >> > > >> >thanks for your prompt reply...h

Re: regular expression

2002-10-18 Thread Mandar Rahurkar
On Thu, 17 Oct 2002, Jeff 'japhy' Pinyan wrote: > [please don't top-post -- it makes the discussion difficult to follow] > > On Oct 17, Mandar Rahurkar said: > > >On Thu, 17 Oct 2002, Jeff 'japhy' Pinyan wrote: > > > >> On Oct 17, M

regular expression

2002-10-18 Thread Mandar Rahurkar
Hi, I am trying to write a regular expresssion which reads as : from the list of following files generate a list which does not start with 150d in the beginning: 150d1.fea 157a6.fea 170c5.fea 2168f5.fea this is how i am trying to do it now : where $no="150d"; <-- this has to be variable @lis

format list

2002-09-04 Thread Mandar Rahurkar
Hi, I wrote perl script so as to have a formatted list however it doesnt work.It cant take a list as its value.It has to be $variable. Does anyone know a workaround. Many Thanks Mandar format TABLE = === A

Re: Passing Arguments into a Program

2002-04-12 Thread Mandar Rahurkar
@ARGV is the variable ur looking for ; here is how to assign args to vars; while(@ARGV) { $var1=shift(@ARGV); $var2=shift(@ARGV); } Adios Mandar On Thu, 11 Apr 2002, Mike wrote: > If a program calls a perl script as follows: /tmp/perltest.pl abc def ghi > jkl mno > > Is there a va

Re: perl

2002-04-05 Thread Mandar Rahurkar
@list= Schelstraete Bart wrote: > > > (sorry, my previous message was signed, which can give some problems) > > > > Hello, > > > > Can somebody tell me if it's possible: > > a) to count all the files in a directory , with extension 'msg' with perl > > Check out the glob operator of perl (perld

Loop

2002-04-03 Thread Mandar Rahurkar
I want files labeled band_1_train_but_1_neutral.txt from 7 to 16 why does this work ? Please let me knoe. @loop=(7, 8, 9, 10, 11, 12, 13, 14, 15, 16); foreach $no (@loop) { $file_list=$list."/band_$no_train_but_1_neutral.txt"; print $file_list,"\n"; } Mandar -- To unsubscribe, e-m

RE: glob

2002-04-03 Thread Mandar Rahurkar
Thanks a lot everyone for all youe help.But does someone know why this happens ? its been troubling me for quite some time now > why does this work ? > glob "*d[23456]*_vow*.fea" > while > glob "*d[^1]*_vow*.fea" Many Thanks Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

glob

2002-04-03 Thread Mandar Rahurkar
why does this work ? glob "*d[23456]*_vow*.fea" while glob "*d[^1]*_vow*.fea" How do we negate in glob ? One more question : i have a list @files; $dir_of_files; i wanna have a list : @completepath= $dir_of_files.@files; However this doesnt work : can i do this w/o using a loop ; Thanks Man

Re: grep (small doubt)

2002-04-03 Thread Mandar Rahurkar
@list=`ls`; @list= glob "*d[^1]*_vow*.fea" ; WHats wrong in using this ? it gives same results as if no caret was there. Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: grep (small doubt)

2002-04-02 Thread Mandar Rahurkar
well, i got a solution : @list= glob "*[d]?_vow*.fea"; Thanks Anyways Mandar On Wed, 3 Apr 2002, Sudarsan Raghavan wrote: > Mandar Rahurkar wrote: > > > Hi, > > Its me again.. > > > > 169b2_vow_band_1.fea > > 2168d6_vow_band_1.fea >

Re: grep (small doubt)

2002-04-02 Thread Mandar Rahurkar
I am using following regexp : $skip=1; @list_neutral=grep /^.{3,4}[^d][^skip].*\.fea$/, @list; this does not match as 3|4 option matches everything :( Mandar On Wed, 3 Apr 2002, Sudarsan Raghavan wrote: > Mandar Rahurkar wrote: > > > Hi, > > Its me again.. > >

Re: grep (small doubt)

2002-04-02 Thread Mandar Rahurkar
Hi, Its me again.. 169b2_vow_band_1.fea 2168d6_vow_band_1.fea @files = grep /^.{3}g[^1].*\.fea$/, @files; can i have an or like for eg : @files = grep /^.{3|4}g[^1].*\.fea$/, @files; Many Thanks Mandar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

Re: grep

2002-04-02 Thread Mandar Rahurkar
Thanks a million guys my prob is solved. Could you please tell me which are good references for regular expressions for perl ... Many Thanks Mandar On Tue, 2 Apr 2002, John W. Krahn wrote: > Sudarsan Raghavan wrote: > > > > Mandar Rahurkar wrote: > > > >

Re: grep

2002-04-02 Thread Mandar Rahurkar
hey, Thanks a lot.How is negation used for eg ^1 for no ones I tried ^1 as in shell.doesnt work !! Thanks Mandar On Wed, 3 Apr 2002, Sudarsan Raghavan wrote: > Mandar Rahurkar wrote: > > > Hi, > > I need to select particular files from list that looks like this : > &g

Re: grep

2002-04-02 Thread Mandar Rahurkar
not 1. ls ???[^g][^1] *.fea Many Thanksplease do send in ur replies. Mandar On Wed, 3 Apr 2002, Sudarsan Raghavan wrote: 2168a5_vow_band_1.fea > > 169b2_vow_band_1.fea > > 2168d6_vow_band_1.fea > > 169g3_vow_band_1.fea > > neutral.txt > > > Mandar Rahurkar

grep

2002-04-02 Thread Mandar Rahurkar
Hi, I need to select particular files from list that looks like this : 2168a5_vow_band_1.fea 169b2_vow_band_1.fea 2168d6_vow_band_1.fea 169g3_vow_band_1.fea neutral.txt This is how the list if files look like.I need files with only g for eg I can do it in linux as fo