Also he probably could have figured it out on his own if he had used strict et al.No. That's the point of my rant. You didn't even bother to try, did you?
strict, warnings and diagnostics turned on. And it didn't tell anything the OP didn't know of.#!/usr/bin/perl use strict; use warnings; use diagnostics; my @Line; COPY: use File::Copy; copy("$Line[0]","$Line[1]") or die "Copy failed: $!"; __END__ syntax error at f line 10, near "use File::Copy" Execution of f aborted due to compilation errors (#1) (F) Probably means you had a syntax error. Common reasons include +: A keyword is misspelled. A semicolon is missing. A comma is missing. An opening or closing parenthesis is missing. An opening or closing brace is missing. A closing quote is missing. Often there will be another error message associated with the synt +ax error giving more information. (Sometimes it helps to turn on -w. +) The error message itself often tells you where it was in the line +when it decided to give up. Sometimes the actual error is several toke +ns before this, because Perl is good at understanding random input. Occasionally the line number may be misleading, and once in a blue + moon the only way to figure out what's triggering the error is to call perl -c repeatedly, chopping away half the program each time to se +e if the error went away. Sort of the cybernetic version of S<20 questions>. Uncaught exception from user code: syntax error at f line 10, near "use File::Copy" Execution of f aborted due to compilation errors. at f line 13
I thought he could use the advice.But there are a million more advices to give - each of them having as much relevance to the OP's problem as the advice you gave. You omitted those.
Also why rant anonomyously? Be proud of your rants, take credit for them.Oh, I am. And don't get the impression you aren't as anonymous as I am. Or do you really think that your description of "Super Genius & XPW" and the image of the monster Frankenstein created you put on your user page identify who you are? Or perhaps it's the "Brother Crossbow of Engaged Distraction" that makes you stand out from the other nerds?
In reply to Re^4: File::Copy a bug?
by Anonymous Monk
in thread File::Copy a bug?
by moked
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |