Re: reading a html page

2003-03-10 Thread Francesco del Vecchio
HTML::Parser you can find it here http://www.perldoc.com/perl5.8.0/lib/HTML/Parser.html Francesco --- learn perl <[EMAIL PROTECTED]> wrote: > Hi guys, is there Modules that would read an html file? or handles html > file? > > Thanks > > Eric > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTE

Re: how to concat files easily?

2003-03-10 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > Hi All, > > Sorry if this is a stupid question. It took me awhile to figure out I > could use the File::Copy module to copy a file, and this is about the same > level of ignorance. > > Is there an easy way to concatenate two (text) files in Perl, short of > opening two

Re: how to concat files easily?

2003-03-10 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > Hi All, > > Sorry if this is a stupid question. It took me awhile to figure out I > could use the File::Copy module to copy a file, and this is about the same > level of ignorance. > > Is there an easy way to concatenate two (text) files in Perl, short of > opening two

Re: net-whois help

2003-03-10 Thread R. Joseph Newton
Thomas Browner wrote: > Can some one help me with the net-whois mod? This is my problem I can > not find any documentation on how to use net-whois. If some one lead me > to some please. > > I will be using with activesate. > > Thank you, > > Thomas >perldoc Net::Whois If it's installed. If not:

Re: Odd number of elements in hash assignment

2003-03-10 Thread R. Joseph Newton
deb wrote: > I'm not sure what you're saying. Since this is an anonymous hash assignment, > how do I pull out the $listkey? Do I need to pre-assign it? For example, > I tried this, added to the previous program, > > foreach $listname (sort keys %Lists) { > print "$listname:\n"; > foreac

Re: Production Mode: Warnings?!

2003-03-10 Thread Wiggins d'Anconia
Jeff Westman wrote: Good info, and I appreciate all who've responded to my post. The reason for my inquiry had to do when I was testing and using the Date::Calc module. I was getting all kinds of warnings about certain variables (inside the package) not being initialized yet (warning in concat

Re: CGI:Session

2003-03-10 Thread Wiggins d'Anconia
Xiongfei Wang wrote: I have code : i got internel server error the error log msg is: Can't locate CGI/Session.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/ 5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_ perl/5.6.0

CGI:Session

2003-03-10 Thread Xiongfei Wang
I have code : code: #!/usr/bin/perl -T use strict; use warnings; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use CGI::Session; use DBI; my $session = new CGI::Session("driver:File", undef, {

Re: Odd number of elements in hash assignment

2003-03-10 Thread deb
Thanks, Steve, for your feedback. As I said in private email to Steve earlier today, I don't mind someone thumping the FM to me - problem is, I've been reading all the FM I could find, including all those mentioned here. Got the printouts right in front of me. But I've been confused by different

Re: Searchable archive for this list?

2003-03-10 Thread Wiggins d'Anconia
Does anyone know of a searchable archive for the [EMAIL PROTECTED] list? The archives I've located don't seem to be searchable... Although this list does not appear to make the cut yet, I found the following useful for other various perl and non-perl lists in the past: http://marc.theaimsgroup.

Re: Inheritance and clone()

2003-03-10 Thread Wiggins d'Anconia
Tom Norwood wrote: I can't find much documentation for this function and related constructor methods. I would be grateful for any assistance that can be offered. I admit I am not to familiar with perldoc but searching (with and without -q) using 'inheritance', 'constructor' and 'clone' keywords g

RE: Production Mode: Warnings?!

2003-03-10 Thread Jeff Westman
Good info, and I appreciate all who've responded to my post. The reason for my inquiry had to do when I was testing and using the Date::Calc module. I was getting all kinds of warnings about certain variables (inside the package) not being initialized yet (warning in concatenation). I only got

Re: reading a html page

2003-03-10 Thread simran
Try: http://search.cpan.org/search?query=html&mode=all On Tue, 2003-03-11 at 10:38, learn perl wrote: > Hi guys, is there Modules that would read an html file? or handles html > file? > > Thanks > > Eric -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

reading a html page

2003-03-10 Thread learn perl
Hi guys, is there Modules that would read an html file? or handles html file? Thanks Eric -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Production Mode: Warnings?!

2003-03-10 Thread Mark Anderson
> I'm just trying to get a general feeling here from the community. > > I have a script that I am getting ready to turn over in "production mode". I > am using 'use strict' of course, and during my coding and testing, have > enable warnings. > > Now that the code is ready to "go production", shoul

Fw: CG I Script [guestbook.cgi]

2003-03-10 Thread Mr. Horace Franklin Jr.
NO MORE ERRORS!!! The script guestbook.cgi is working! My heartfelt thank to everyone that assisted me. > - Original Message - > From: "Mr. Horace Franklin Jr." <[EMAIL PROTECTED]> > To: "R. Joseph Newton" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Mond

Re: CG I Script [guestbook.cgi]

2003-03-10 Thread Mr. Horace Franklin Jr.
NO MORE ERRORS The script guestbook.cgi is working! - Original Message - From: "Mr. Horace Franklin Jr." <[EMAIL PROTECTED]> To: "R. Joseph Newton" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, March 10, 2003 7:04 AM Subject: Re: CG I Script [guestbook.cgi

Re: Handling race conditions

2003-03-10 Thread Michael Weber
Hmmm... Please allow me to combine two different sub-threads. >>> simran <[EMAIL PROTECTED]> 03/07/03 12:02AM >>> On Fri, 2003-03-07 at 13:51, R. Joseph Newton wrote: > Wiggins d'Anconia wrote: > > > > > In general this would be handled with a lock file. When the first > Good idea, but I thi

Re: how to concat files easily?

2003-03-10 Thread John W. Krahn
Peter Farrar wrote: > > Sorry if this is a stupid question. It took me awhile to figure out I > could use the File::Copy module to copy a file, and this is about the same > level of ignorance. > > Is there an easy way to concatenate two (text) files in Perl, short of > opening two to read and on

Inheritance and clone()

2003-03-10 Thread Tom Norwood
I can't find much documentation for this function and related constructor methods. I would be grateful for any assistance that can be offered. I admit I am not to familiar with perldoc but searching (with and without -q) using 'inheritance', 'constructor' and 'clone' keywords gave me nothing. Same

Re: Production Mode: Warnings?!

2003-03-10 Thread Paul Johnson
On Mon, Mar 10, 2003 at 09:23:57AM -0800, Jeff Westman wrote: > Now that the code is ready to "go production", should I turn off the warnings > mode? With warnings turned on your code will run imperceptibly slower, but you will be able to find out what goes wrong and why as soon as it goes wrong.

Re: Odd number of elements in hash assignment

2003-03-10 Thread Steve Grazzini
Deb <[EMAIL PROTECTED]> writes: > > I understand this: > > foreach $listname (sort keys %Lists) { > print "$listname\n"; > } > > But, I don't quite get how to get to the key values > below that. I know I'm so close, but just not quite > there... > > Could some kind soul give me a blow by

RE: Production Mode: Warnings?!

2003-03-10 Thread Kipp, James
> I'm just trying to get a general feeling here from the community. > > I have a script that I am getting ready to turn over in > "production mode". I > am using 'use strict' of course, and during my coding and > testing, have > enable warnings. you can keep the warnings and use some means o

RE: how to concat files easily?

2003-03-10 Thread Dan Muey
> Hi All, > > Sorry if this is a stupid question. It took me awhile to > figure out I could use the File::Copy module to copy a file, > and this is about the same level of ignorance. > > Is there an easy way to concatenate two (text) files in Perl, > short of opening two to read and one to

Re: how to concat files easily?

2003-03-10 Thread Aimal Pashtoonmal
Hi, I am not sure if it is what you want, but why not do it on the command line with the cat command? or may be use this oneliner "perl -e '{print `cat *.infiles`}' > out_file" or something similar. May be you could capture what you want using backticks and the above within your perl script. hop

Re: Odd number of elements in hash assignment

2003-03-10 Thread Scott R. Godin
Deb wrote: > You know, I'm just not "getting it" I guess. When I read through > simple of examples in perldsc and perlfunc, it seems straightforward > enough, but when I try to put into practice everything, it doesn't go > as I might expect. > > Recall this code I posted a day or two ago: > > -

how to concat files easily?

2003-03-10 Thread Peter_Farrar
Hi All, Sorry if this is a stupid question. It took me awhile to figure out I could use the File::Copy module to copy a file, and this is about the same level of ignorance. Is there an easy way to concatenate two (text) files in Perl, short of opening two to read and one to write and then loop l

Re: Odd number of elements in hash assignment

2003-03-10 Thread deb
I'm not sure what you're saying. Since this is an anonymous hash assignment, how do I pull out the $listkey? Do I need to pre-assign it? For example, I tried this, added to the previous program, foreach $listname (sort keys %Lists) { print "$listname:\n"; foreach $key (sort keys %Lists)

Re: Production Mode: Warnings?!

2003-03-10 Thread beau
On 10 Mar 2003 at 9:23, Jeff Westman wrote: > I'm just trying to get a general feeling here from the community. > > I have a script that I am getting ready to turn over in "production mode". I > am using 'use strict' of course, and during my coding and testing, have > enable warnings. > > Now

Re: CG I Script [guestbook.cgi]

2003-03-10 Thread Scott R. Godin
Mr. Horace Franklin Jr. wrote: > It looks like this error came about in the course of re-formatting. I > looked at earlier versions of the same script, and the ending tag was > flush > left. So also was the rest of the html. It probably was a good idea to > indent the html, not so good with the

Production Mode: Warnings?!

2003-03-10 Thread Jeff Westman
I'm just trying to get a general feeling here from the community. I have a script that I am getting ready to turn over in "production mode". I am using 'use strict' of course, and during my coding and testing, have enable warnings. Now that the code is ready to "go production", should I turn o

RE: Odd number of elements in hash assignment

2003-03-10 Thread Timothy Johnson
-->8- "I understand this: foreach $listname (sort keys %Lists) { print "$listname\n"; } -->8- To get the values instead of the keys, you will have to do something like this: foreach $listkey (sort keys %Lists){ print "$List

Re: Searchable archive for this list?

2003-03-10 Thread Casey West
It was Monday, March 10, 2003 when Kevin Old took the soap box, saying: : Rob, : : : : > I still do not understand why the person who put together the archives : > site you originally mentioned did not see fit either to make it : > searchable or to mention the newsgroup names. : > : : Correcti

Re: Searchable archive for this list?

2003-03-10 Thread Kevin Old
Rob, > I still do not understand why the person who put together the archives > site you originally mentioned did not see fit either to make it > searchable or to mention the newsgroup names. > Correction. They did. There is a link on the http://lists.perl.org/showlist.cgi?name=beginners pag

Re: net-whois help

2003-03-10 Thread Casey West
It was Monday, March 10, 2003 when Thomas Browner took the soap box, saying: : Can some one help me with the net-whois mod? This is my problem I can : not find any documentation on how to use net-whois. If some one lead me : to some please. : : I will be using with activesate. http://search.cpan.

Re: Searchable archive for this list?

2003-03-10 Thread Rob Richardson
Kevin, Thank you very much for pointing out that the beginners Perl list is accessible as a newsgroup, and can be read through newsgroup readers including Google. Many of us were not aware of that. The newsgroup name is "perl.beginners", and the CGI beginners' group is perl.beginners.cgi. I s

Re: Odd number of elements in hash assignment

2003-03-10 Thread deb
You know, I'm just not "getting it" I guess. When I read through simple of examples in perldsc and perlfunc, it seems straightforward enough, but when I try to put into practice everything, it doesn't go as I might expect. Recall this code I posted a day or two ago: 8-< -- snip

RE: Test for empty list

2003-03-10 Thread Jeroen Lodewijks
Thanks all for the comments. Indeed I am interested in the empty list, not the print statement. I merely wanted to know if some sort special list operator existed. I am pretty sure that the code with 'last' is quicker than the ones with 'grep' but will do some tests on it. Cheers, Jeroen >===

RE: Midify HTML on the fly

2003-03-10 Thread Dan Muey
In your sub that parses our img tags :: print " $image_alt \n"; Or assign that toa var and replace it withh the var. Sorry it's not more but we don't have muxh example top go by. DMuey > I'm writing a program that get an HTML document and must > modify it on the fly...for example changin

Midify HTML on the fly

2003-03-10 Thread Francesco del Vecchio
I'm writing a program that get an HTML document and must modify it on the fly...for example changing images o links. I suppose I have to use the HTML::Parser to do this job...and in fact I have no problem reading all the tags and the parameters. The problem came when I want to change this parame

RE: store file paths in the database of the images

2003-03-10 Thread Dan Muey
What is this for? It seems to be commercial or homework perhaps. In that case I can't just donate my time. Always a good idea to outline what it needs to do ::: Current script that uploads and modifies images- After picture uploaded and renamed :: 1) Get image info 2)INSERT into database Publi

Re: Searchable archive for this list?

2003-03-10 Thread Kevin Old
Deb, Have you been here -> http://lists.perl.org/showlist.cgi?name=beginners Also, you can use groups.google.com. In the search box put: search terms group:perl.beginners You can also search without the "group:perl.beginners" part and get answerjust put perl in your search. HTH, Kevin

net-whois help

2003-03-10 Thread Thomas Browner
Can some one help me with the net-whois mod? This is my problem I can not find any documentation on how to use net-whois. If some one lead me to some please. I will be using with activesate. Thank you, Thomas

Re: Searchable archive for this list?

2003-03-10 Thread mel awaisi
Please tell me if you do find one? Regards, Mel From: Deb <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Perl List <[EMAIL PROTECTED]> Subject: Searchable archive for this list? Date: Mon, 10 Mar 2003 07:31:04 -0800 Does anyone know of a searchable archive for the [EMAIL PROTECTED] list

RE: why objects?

2003-03-10 Thread Dan Muey
> > > > That one I'm not so sure about. Many times the object has > > > MUCH more overhead that a custom-code solution, and the > > > package-space lookups add a lot, too. Machine time isn't > > > really an issue here, tho; programmer time is more valuable, > > > and I *know* object code maximi

Searchable archive for this list?

2003-03-10 Thread Deb
Does anyone know of a searchable archive for the [EMAIL PROTECTED] list? The archives I've located don't seem to be searchable... Thanks, d -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: how to do this in perl

2003-03-10 Thread Dan Muey
$agree = param('agree'); if($agree) {...} else { print "Sorry you must agree"; } Seems like you need a way for regstr.html to check for the input. You mayu need to change it to cgi instead of html so it can do that. DMuey > I am very new to perl. > i need to write a simple user log system > if

RE: Help in writing information on directory space usage

2003-03-10 Thread Dan Muey
> user1,userdomain1 > user2,userdomain2 > user3,userdomain3 > > The script pull that information and for each pair of data, > does a system > command on 'du' to get the amount of diskspace being used and > assign it to > a variable which can be written to a webpage like this (for example): >

RE: Help in writing information on directory space usage

2003-03-10 Thread Bakken, Luke
> $spaceused=system("du -sh /home/$userdomain1"); $spaceused = qx!du -sh /home/$userdomain!; Luke -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Help in writing information on directory space usage

2003-03-10 Thread Steveo
I'm trying to setup a perl script which will generate a summary of diskusage on people that I'm hosting webpages for. I have a flat ascii text file that looks like this: user1,userdomain1 user2,userdomain2 user3,userdomain3 The script pull that information and for each pair of data, does a syst

RE: store file paths in the database of the images

2003-03-10 Thread Dan Muey
> Hi > > thanks for the help, dont you know any script that are ready that do > something like what i would like. > I'm sure there is but this list is about learning and helping not doing. Give a man a script help him for a day. Teach him how to script help him every day. DMuey > > > Rega

RE: Main email body

2003-03-10 Thread Dan Muey
I've recently been doing lots of mail parsing. Here's an awesome solution I found :: use Mail::Internet; my $mail = Mail::Internet->new(\*STDIN); my $headers = $mail->head->header_hashref; my @body = @{$mail->tidy_body()}; Now you have your headers in hash and the body in an array. print $head

RE: qmail with perl

2003-03-10 Thread Dan Muey
> Hi > > I know how to use sendmail with perl, but not sure about > qmail. How much does the piping syntax of qmail differ to sendmail? man qmail-inject That shows you how the command line would go then you just put it in :: open (MAIL,"|/var/qmail/bin/qmail-inject -f $from"); The difference

RE: store file paths in the database of the images

2003-03-10 Thread Dan Muey
> Hi Howdy > > I have a perl script that takes images coming from a camera > /home/httpd/htdocs/image.jpg and renames them the date and > time of images to > /home/me/images/2003_7_3_20_11_23.jpg. > > I would like to store file paths in the database of the use Files::Slurp; @files = read_d

Re: deduplicate array

2003-03-10 Thread Rob Dixon
Francesco Del Vecchio wrote: > how can I, as afficiently as I can, drop duplicated values from an > array? Hi Francesco. Take a look at: perldoc -q "remove duplicate" HTH, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Parsing with contions

2003-03-10 Thread Rob Dixon
Francesco Del Vecchio wrote: > Sorry...I tryied to keep my mail short: > > I have to match /img/giallo.gif > > HERE -> "/img/giallo.gif" > HERE -> "whaterveryouwant/img/giallo.gif" > HERE -> "/img/giallo.gif?mypar" > NOT HERE -> "http://www.html.it/img/giallo"; > > I hope this clarify you. Thank y

deduplicate array

2003-03-10 Thread Francesco del Vecchio
how can I, as afficiently as I can, drop duplicated values from an array? tnx Francesco __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comman

Re: Parsing with contions

2003-03-10 Thread Francesco del Vecchio
Sorry...I tryied to keep my mail short: I have to match /img/giallo.gif HERE -> "/img/giallo.gif" HERE -> "whaterveryouwant/img/giallo.gif" HERE -> "/img/giallo.gif?mypar" NOT HERE -> "http://www.html.it/img/giallo"; I hope this clarify you. Tnx for your interest Francesco --- Rob Dixon <[EM

Fw: CG I Script [guestbook.cgi]

2003-03-10 Thread Mr. Horace Franklin Jr.
Rob/Joseph, It worked, thanks. Horace > - Original Message - > From: "R. Joseph Newton" <[EMAIL PROTECTED]> > To: "Rob Dixon" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Sunday, March 09, 2003 7:51 PM > Subject: Re: CG I Script [guestbook.cgi] > > > > Rob Dixon wrote: > > > > >

Re: CG I Script [guestbook.cgi]

2003-03-10 Thread Mr. Horace Franklin Jr.
- Original Message - From: "R. Joseph Newton" <[EMAIL PROTECTED]> To: "Rob Dixon" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, March 09, 2003 7:51 PM Subject: Re: CG I Script [guestbook.cgi] > Rob Dixon wrote: > > > Mr. Horace Franklin Jr. wrote: > > > Rob, > > > Disregard t

Re: CG I Script [guestbook.cgi]

2003-03-10 Thread Mr. Horace Franklin Jr.
Joseph, I am dealing with error messages one by one, in the order encountered.. This is the last error I received. Software Errors: 03/10/2003: What? - Bareword "LINE" not allowed while "strict subs" in use at guestbook.cgi line 23. Execution of guestbook.cgi aborted due to comp

RE: Help with File::Find

2003-03-10 Thread Kipp, James
> > find { > > preprocess => sub { grep( /My\s+Documents/, @_) }, > > wanted => sub { print "$File::Find::name\n"} > > }, 'c:/test2'; > > Firstly don't forget that Windows treats the 'My Documents' directory > as a special case. Windows Explorer shows it at the same tree level > as My

Re: Parsing with contions

2003-03-10 Thread Rob Dixon
Francesco Del Vecchio wrote: > I have a little problem with my pattern matching > > I need to find a string into the text but I have to be sure that this > is not part of a known bigger string. > > Example: > > I need to find: /img/giallo.gif > but I have to be sure this is not: http://www.html.it/

Re: Check url for form submission

2003-03-10 Thread Rob Dixon
Colin Johnstone wrote: > Gidday All, > > I have found this subroutine in someone else's program I need to > modify it so it will work on my server. I wish to use it to confirm > that only forms submiited from my Domain will be processed. Its the > reg ex I don't understand, Can someone help me re-w

Re: How to check ASCII chars in perl ?

2003-03-10 Thread Rob Dixon
Madhu Reddy wrote: > > > > i don't thing the above will work. try: > > > > > > > > for(split(//)){ > > > > if(ord < 32 || ord > 126){ > > > > print "Char is non printable char\n"; > > > > }else{ > > > > print "$_\n"; > > > > } > > > > } > > I want to do following, if any char is ASCII value of > 10

Parsing with contions

2003-03-10 Thread Francesco del Vecchio
I have a little problem with my pattern matching I need to find a string into the text but I have to be sure that this is not part of a known bigger string. Example: I need to find: /img/giallo.gif but I have to be sure this is not: http://www.html.it/img/giallo.gif notice that the string to f

Mail::MboxParser query getting the raw message

2003-03-10 Thread Ramprasad
Hello all, I am using Mail::MboxParser for cleaning up my mail folders created in pine. Pine puts all junk chars which I wish to remove How do I get the raw message from the message object created in Mail::MboxParser -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma