Much for me. I never know if i give enough information or not at each time.
By saying "it seems to not work" i mean there are no error output but it doesn't do what i expected i.e. take on a random element from the list to compare it with the following.
Iam using List::Util to try to get a random element also.
And for the code , i just used
choroba input , above.
my @browsers = ('firefox', 'chrome', 'internet explorer');
my @random_array = shuffle(@browsers);
for my $b1_idx (0 .. $#random_array - 1) {
my $b1 = $screen{ $browsers[$b1_idx] };
for my $b2_idx ($b1_idx .. $#browsers) {
my $b2 = $screen{ $browsers[$b2_idx] };
unless ($b1->compare($b2)) {
my $diff_file = $b1->difference($b2);
print '#The images are not the same; see' . $diff_file .' fo
+r details'."\n";
qx{ $diff_file };
}
}
}
Doing that, my goal is to get a random element from list :
my @browsers = ('firefox', 'chrome', 'internet explorer');
For example, compare at first 'chrome' screenshot with 'internet explorer' screenshot and after 'firefox' with 'chrome' etc.
Thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.