Young Anonymous,

It's not about wanting and needing, but about sharing and contributing. So I'll help you out a little with this "working" script.
You'll have to change some things to get it working entirely with just perl instead of using system calls ;).

So it's up to you to:

And thus completely rewrite this quick and dirty example.

To speak with the unforgettable words of Janice Joplin, "Try-ha-ha-ha-ha, just a little bit harder".

#!/usr/bin/perl -w #popuppagechecker.pl $url = "empty";#;) if ($ARGV[0]) { $url = $ARGV[0]; } if ($url eq "empty"){ print "Specify url like popuppagechecker.pl http:\/\/www.makemyhomewor +k.com\n"; exit; } open TEL, "lynx -source $url|"; @text = <TEL>; $darnpopup = "false"; # teabags full report ;) print "@text\n$url"; foreach $line(@text){ if ($line =~ m/window.open/g){ print " probably has popups, (or some other lame javascript....)\n"; $darnpopup = "true"; } } if ($darnpopup ne "true"){ print " probably has no popups\n"; }

Hmm, I just realised fixing the above code sounds even like more homework then you're in for! hehe...

Teabag
Sure there's more than one way, but one just needs one anyway - Teabag


In reply to Re: Check for popups in webpage by teabag
in thread Check for popups in webpage by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.