Re: Constant Hash problem

2005-12-20 Thread Andreas PĆ¼rzer
John W. Krahn schrieb: Kevin Old wrote: So to achieve an anonymous hash I'd have to do the following, correct? use constant STOPWORDS = { 'a' = 1, 'about' = 1, 'above' = 1, 'across' = 1,

Am a newbie ....

2005-12-20 Thread Brahadambal S
Hi, Could anyone tell me how to execute a .bat or .exe file through Perl? i.e, the perl code should invoke the executable. Thanks so much for your help(in advance). regards, brahad.

Re: Am a newbie ....

2005-12-20 Thread Ing. Branislav Gerzo
Brahadambal S [BS], on Tuesday, December 20, 2005 at 13:48 (+0530) made these points: BS Could anyone tell me how to execute a .bat or .exe file BS through Perl? i.e, the perl code should invoke the executable. BS Thanks so much for your help(in advance). if you are newbie, good hint is using

WWW::Mechanize, save images from a page

2005-12-20 Thread Dhanashri Bhate
Hi All, I am currently automating some UI tests with the help of WWW::Mechanize module. I need to save images on a webpage. I tried using the find_image function to get the reference of the image ( as shown in the script below ). But do not understand how I can save that image in a file.

Re: WWW::Mechanize, save images from a page

2005-12-20 Thread Ing. Branislav Gerzo
Dhanashri Bhate [DB], on Tuesday, December 20, 2005 at 16:51 (+0530) thinks about: DB I am currently automating some UI tests with the help of WWW::Mechanize DB module. DB I need to save images on a webpage. DB print Found the image, reference is : $imageref\n; if you have URL in $imageref,

RE: WWW::Mechanize, save images from a page

2005-12-20 Thread Dhanashri Bhate
DB I am currently automating some UI tests with the help of WWW::Mechanize DB module. DB I need to save images on a webpage. DB print Found the image, reference is : $imageref\n; if you have URL in $imageref, what is problem with saving ? $mech-get($imageref); and save_contents() aka you'll

Recall: WWW::Mechanize, save images from a page

2005-12-20 Thread Dhanashri Bhate
Dhanashri Bhate would like to recall the message, WWW::Mechanize, save images from a page. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: WWW::Mechanize, save images from a page

2005-12-20 Thread Dhanashri Bhate
DB I am currently automating some UI tests with the help of WWW::Mechanize DB module. DB I need to save images on a webpage. DB print Found the image, reference is : $imageref\n; if you have URL in $imageref, what is problem with saving ? $mech-get($imageref); and save_contents() aka you'll

Re: WWW::Mechanize, save images from a page

2005-12-20 Thread Ing. Branislav Gerzo
Dhanashri Bhate [DB], on Tuesday, December 20, 2005 at 17:53 (+0530) wrote the following: DB If I do as you have mentioned above, $mech-success is False. ( $mech-get DB expects a url ) DB I tried to get the complete the URL by concatenating the $imageref-base and DB $imageref-url. And then issue

Re: Running Other Programs from Perl (WAS: Am a newbie ....)

2005-12-20 Thread Shawn Corey
Brahadambal S wrote: Hi, Could anyone tell me how to execute a .bat or .exe file through Perl? i.e, the perl code should invoke the executable. Thanks so much for your help(in advance). Open a terminal and type: perldoc -f system perldoc perlop (and search for 'qx') perldoc perlopentut

Re: Reading the built-in number variables

2005-12-20 Thread Bob Showalter
[EMAIL PROTECTED] wrote: The issue: I have a routine which builds a regex and 'knows' which paren matches to use afterwords. For instance after a line such as: use strict; my $data =~ m/^(\S+)\s+((\S+\s+)?(\S+))$/; the routine 'knows' it wants $1 and $4. Another pass through the regex will

Re: Am a newbie ....

2005-12-20 Thread Bob Showalter
Brahadambal S wrote: Hi, Could anyone tell me how to execute a .bat or .exe file through Perl? i.e, the perl code should invoke the executable. Thanks so much for your help(in advance). Perl has two standard ways: 1) system() function, which executes an external program and returns its exit

Re: use constant

2005-12-20 Thread Shawn Corey
David Gilden wrote: I looked for documentation on 'use constant' but it has eluded it me. perldoc constant -- Just my 0.0002 million dollars worth, --- Shawn * Perl tutorials at http://perlmonks.org/?node=Tutorials * A searchable perldoc is available at http://perldoc.perl.org/

Re: use constant

2005-12-20 Thread DBSMITH
John W. Krahn [EMAIL PROTECTED]

Re: use constant

2005-12-20 Thread JupiterHost.Net
David Gilden wrote: Greetings, I looked for documentation on 'use constant' but it has eluded it me. perldoc constant my $path = `pwd`; use constant UPLOAD_DIR = /home/sites/site123/web/private/_data/; I want to get the Document Root at runtime and concatenate like such...

Problem with retrieving output from commands using net::telnet

2005-12-20 Thread Tim Huffman
All, I'm trying to write a perl script that will telnet a device and run one of two commands based on the output from a beginning command. I'm still in the beginning stages of this, and right now I'm simply trying to print the output from the device to standard out. Reading the documentation on

syntax of a perl program?

2005-12-20 Thread anand kumar
Hi all Can anyone let me know some functions or some tutorial on how to check the syntax of a perl program. Thanks in advance Anand Send instant messages to your online friends http://in.messenger.yahoo.com

Re: syntax of a perl program?

2005-12-20 Thread Shawn Corey
anand kumar wrote: Hi all Can anyone let me know some functions or some tutorial on how to check the syntax of a perl program. perldoc -c your_script See: perldoc perlrun (and search for '-c') -- Just my 0.0002 million dollars worth, --- Shawn * Perl tutorials at

Assign regex in var possible ?

2005-12-20 Thread Jimmy
Hi all, Just start with perl, not so understood what's the range on using regex. Can I do something like : $x = /\.(jpg|jpeg|gif|bmp)$/i; for (@filelist) { push @result, $_ if $_ =~ $x } since the expression will use time to time, so split it as sub is not effective enough either Any

Re: Assign regex in var possible ?

2005-12-20 Thread John W. Krahn
Jimmy wrote: Hi all, Hello, Just start with perl, not so understood what's the range on using regex. Can I do something like : $x = /\.(jpg|jpeg|gif|bmp)$/i; That is interpreted by perl as: $x = $_ =~ /\.(jpg|jpeg|gif|bmp)$/i; So yes you can do that but it looks like you really want

Re: Assign regex in var possible ?

2005-12-20 Thread Jimmy
Wow !! That perfect!!! Exactly what I want ! Thank you very much John. Jim - Original Message - From: John W. Krahn [EMAIL PROTECTED] To: Perl Beginners beginners@perl.org Sent: Wednesday, December 21, 2005 12:30 PM Subject: Re: Assign regex in var possible ? Jimmy wrote: Hi all,

re: WWW::Mechanize, save images from a page

2005-12-20 Thread mtbr1221
(I had tried to reply via nntp news which didn't work. I just now subscribed to the emailing list. this is emailed to the list). [EMAIL PROTECTED] (Dhanashri Bhate) writes: I tried using the find_image function to get the reference of the image ( as shown in the script below ). But do not