498 $word = qw("$word") if ($word =~ /\s/);
qw does not interpolate. You probably meant to do this instead:
$word = qq("$word") if ($word =~ /\s/);
534 print <<ENDHELP; 535 Hellow theres.. 536 This script (ab)uses the google image search to find an image +of 537 adequate proportions from a random word from your computers 538 dictionary file, and attempts to download it and set it as you +r 539 desktop wallpaper. If you supply words arguments, then this sc +ript 540 will use them as the basis of your search. 541 542 Usage: 543 random-bg.pl 544 random-bg.pl have 545 random-bg.pl jackie chan --delay 5 546 random_bg.pl --rotate --delay 2 547 548 If you give it words in @ARGV, it will continually show images
Arrays are interpolated in double quoted strings. You need to escape the '@' character.
210 open(TOPIC, ">$topic_file") or die "can't open $topic_file +"; 218 open(TOPIC, "$topic_file") or die "can't open $topic_file. +"; 227 open(IDFILE, ">>$id_file"); 236 open(IDFILE, $id_file); 354 open FILE, ">$file" or &debug("can't open $file\n") and re +turn 0;
You should always verify that the file opened correctly before trying to use a possibly invalid filehandle. You should include the $! or $^E variable in the error message so you know why it failed to open.

In reply to Re: Random wallpaper harvester by jwkrahn
in thread Random wallpaper harvester by Snarius

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.