feeding www:mechanize from a set of files

2016-03-09 Thread Luca Ferrari
Hi all, I'm building my own robot to do some stuff with a few interactive pages. Since I know that, after filling a form and hitting the button, I'll be redirected to another form/page to fill and so on for a few steps. What I would like to do is to test my robot against a static copy of the pages,

Re: Perl sort for reverse numeric if numbers and text are in a string, numbers first

2016-03-09 Thread Brock Wilcox
Probably you have "use warnings" turned on. You can disable the warning for numeric comparison with "no warnings 'numeric';" perl -E 'use warnings; no warnings "numeric"; my @a = ("12\thi","37\tb","123\tc","187\ta"); my @b = sort { $a <=> $b } @a; say join("\n",@b)' 12 hi 37 b 123 c