On Jan 21, zentara said:

>copy( "$ARGV[0]", "$ARGV[0]\.bak" );
>chmod ($mode, "$ARGV[0]\.bak");
>print "Backup completed.\n";

Why do you backslash the . in "$ARGV[0]\.bak" but not in "completed.\n"?

Long story short, you don't need to \ the . in either case, and you don't
need quotes around $ARGV[0] as the first argument to copy().

  copy($ARGV[0] => "$ARGV[0].bak");

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to