David Gilden writes ..

>Sorry to ask this, as I am quite new at this.
>And the online class that I am just now finishing has
>lots of bad code for examples!
>
>>From this list: 
>
> print "'$file' => '$newfile'\n";
>             ^^^^^^^^^
> 
>What does this line mean, this a renaming convention?

there's no renaming happening .. it's a print statement .. basically it's of
the form

  print "some text";

see the double-quotes in the original statement .. they tell Perl to print
everything in between the quotes and perform variable interpolation on the
way .. so both $file and $newfile will have their values substituted for
them in the string

the single quotes are within the double quotes - so they're just part of the
print output

and the => is just a sequence of two characters that will also be printed
(although it means other things in other contexts)

this is all because there are double-quotes around everything .. so as far
as Perl is concerned - it's just a string to be printed

-- 
  jason king

  No children may attend school with their breath smelling of "wild
  onions" in West Virginia. - http://dumblaws.com/

Reply via email to