Question: During the startup of a Linux AMI, I would like to download some data (like the sun java libraries and some proprietary software) from an S3 bucket while initializing my EC2 connection. I notice that one way to do this is to use s3cmd. BUT, how do I get the configuration file for s3cmd .s3cfg from S3?

Also, let me also know if there is a better way to connect to S3 storage during init.

Thanks!

Answer: 
`$0` is a valid symbol in Perl, too (it contains the name of the currently running Perl script) and is also interpolated inside backquotes. You need to escape it, too:

```
my $results = `awk 'tolower(\$0) ~ \$sanitized_query' *_Codes.txt`;

```
While Skolor's answer is completely appropriate, here's a slightly different approach, making use of the [smart match operator](http://perldoc.perl.org/perlsyn.html#Smart-matching-in-detail) (which is available in Perl version 5.10 or greater). If the lines of your text file are really long and if you don't have a lot of words to check against the lines, this might be a quicker approach (emphasis on "might").

```
use strict;
use warnings;

my @query_words=qw(204 test leg);

open(my $read,"<","input_file") or die $!;

while(<$read>)
{
  chomp; #get rid of trailing newline
  my @words=split(/\s+/,$_); #split on spaces to get actual words

  foreach my $q (@query_words)
  {
    if($q~~@words) #If we have a match, print and exit the loop.
    {
      print "$_\n";
      last;
    }
  }
}

close($read);

```