WWW::Mechanize, getting link url/text

2006-04-13 Thread Dhanashri Bhate
Hi All, I'm trying to automate a test case where from a site map page, I need to get all the links and verify that clicking on the links is successful, for each link. Here's the code I've written and it works well, ( below is the relevant part of the code ( I have used strict, warn)) ==

Word Count Question.

2006-04-13 Thread Max von Seibold
I'm trying to write a small word counting script - I'm certain there are zillions out there but it seemed a good learning exercise... Bascially I read in each line from my text file which I want to count with a basic while loop and file handle. The problem is on the count. I know I could spli

Re: Word Count Question.

2006-04-13 Thread Mr. Shawn H. Corey
On Thu, 2006-13-04 at 15:05 +0100, Max von Seibold wrote: > I'm trying to write a small word counting script - I'm certain there are > zillions out there but it seemed a good learning exercise... > > Bascially I read in each line from my text file which I want to count > with a basic while loop

Re: Word Count Question.

2006-04-13 Thread Dr.Ruud
Max von Seibold schreef: > However this only tells me if there are individual words in each line. > Is there some way I can count there occurrences? See `perldoc count` #!/usr/bin/perl use strict; use warnings; while () { print; print scalar( () = /\w+/g ), "\n"; } __DATA__ Abc, def ghi! J

Re: Word Count Question.

2006-04-13 Thread Joshua Colson
On Thu, 2006-04-13 at 15:05 +0100, Max von Seibold wrote: > I'm trying to write a small word counting script - I'm certain there are > zillions out there but it seemed a good learning exercise... > > Bascially I read in each line from my text file which I want to count > with a basic while loop

Re: Word Count Question.

2006-04-13 Thread Dr.Ruud
"Mr. Shawn H. Corey" schreef: > my $count = () = $lineFromFile =~ m/\b\w+\b/; The "/g" modfier is missing. Do you have a special reason to use \b next to \w? I think it will work equally well without the \b-s. The \w is "digits plus letters plus underscore", which in ASCII is limited to [0-9A-Z

Re: Word Count Question.

2006-04-13 Thread Dr.Ruud
Joshua Colson schreef: > $wc{$1}++ while m/\b(\w+)\b/g; Alternative, ignoring case: $wc{lc $1}++ while m/(\w+)/g; -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

array

2006-04-13 Thread Irfan J Sayed
Hi All, I need to store the output of command in one array. the output of that command is generally 5 to 6 lines . i wanted to store each line in the array how can i achieve that . Regards Irfan Sayed

Re: array

2006-04-13 Thread Jeff Pang
It's simple to do that in Perl.For example,if you want to capture the unix command pwd's output,you just do: my @pwd = `pwd`; print @pwd; just good as you input 'pwd' command under unix shell. -Original Message- >From: Irfan J Sayed <[EMAIL PROTECTED]> >Sent: Apr 13, 2006 11:44 AM >To:

How to redefine an autoload sub.

2006-04-13 Thread perl
#!/usr/local/bin/perl write_function1("first"); print auto_function(), "\n"; # This will print: # auto_function first write_function1("second"); # How would I undefine the autoloaded version of auto_function? print auto_function(), "\n"; # This will print: # auto_function first # But I would like

array help

2006-04-13 Thread Irfan J Sayed
Hi, I am executing following command. my @activity = system "cleartool lsactivity -short -view Admin_Irfan_Project_int"; but the output of this command is not storing in the array. array is empty. plz help Regards Irfan Sayed

Re: array help

2006-04-13 Thread Tom Phoenix
On 4/13/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > I am executing following command. > > my @activity = system "cleartool lsactivity -short -view > Admin_Irfan_Project_int"; You seem to want backticks, also known as qx// . You can find it in the perlop manpage, in the section on "Quote and Qu

RE: array help

2006-04-13 Thread Ankur Gupta
Irfan J Sayed scribbled on Thursday, April 13, 2006 9:46 AM: > Hi, > > I am executing following command. > > my @activity = system "cleartool lsactivity -short -view > Admin_Irfan_Project_int"; > > but the output of this command is not storing in the array. array is

regex matching conditionally

2006-04-13 Thread JupiterHost.Net
Howdy list, I'm trying to see if I can do this in one regex instead of multiple stage, mainly for educational purposes since I already have it in multipel steps. I am trygin to get each string between { and } where the {} occurs between double quotes. So with "file.optcondition={/Root/Get

RE: regex matching conditionally

2006-04-13 Thread Timothy Johnson
Will the string always have the two quotes in the same place and only one per string? What about something like this? /.*?\{([^\}]*)\}(?=.*")/gi -Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Thursday, April 13, 2006 5:16 PM To: beginners@perl.org Subject:

Which CPAN module to alter Win32 Access Control List (ACL)?

2006-04-13 Thread siegfried
I have a problem with Microsoft Access. As you might know, MS Access is not a real database in the sense it is not a separate process like, MySQL. Instead of a separate processes, the MSAccess driver creates a separate file with the extension of .mdl. This is the lock file. While you can grant ever

Re: regex matching conditionally

2006-04-13 Thread JupiterHost.Net
Timothy Johnson wrote: Will the string always have the two quotes in the same place and only Well, it could have multiple {} inside or outside of multiple "" AFAIK. one per string? What about something like this? /.*?\{([^\}]*)\}(?=.*")/gi That does work on that exact string, I'll have

Re: regex matching conditionally

2006-04-13 Thread Randy W. Sims
JupiterHost.Net wrote: Howdy list, I'm trying to see if I can do this in one regex instead of multiple stage, mainly for educational purposes since I already have it in multipel steps. I am trygin to get each string between { and } where the {} occurs between double quotes. So with "file