If that really is a code snippet, it looks like you need to take a basic programming course. When you say
my $new_url = "http://www.google.com/search?q=$a" ;
my $new_url = "http://hotbot.lycos.com/?MT=$a" ;
my $new_url = "http://www.altavista.com/sites/search/web?q=$a&kl=XX&pg
+=q" ;
you are assigning three different values to the same place in memory, one after another, without doing anything to them.
If, as others have suggested, this is homework, you should seek help quick. Go immediately to your teacher and show them how far you have got. You may feel stupid doing this, but feeling stupid is part of learning.
On the other hand, if you have a better idea of what your doing than you post seems to suggest, you need to supply some error messages, and MORE CODE, so that the monks can help you further.
-
Boldra
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.