in reply to Re^2: File::Copy a bug?
in thread File::Copy a bug?

I said it because he seemed like a newbie and I thought he could use the advice. Also he probably could have figured it out on his own if he had used strict et al.

Also why rant anonomyously? Be proud of your rants, take credit for them.

Replies are listed 'Best First'.
Re^4: File::Copy a bug?
by Anonymous Monk on Aug 18, 2005 at 16:52 UTC
    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?
    #!/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
    strict, warnings and diagnostics turned on. And it didn't tell anything the OP didn't know of.

    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?
      My didn't you get up on the wrong side of the bed this morning. I didn't post any code because others had already posted excellent suggestions. I didn't see anyone suggest using strict so I added that to the advice given the OP.

      Also I don't feel that personal attacks on me are warranted. If you don't like what I post fine. Why not send your personal attacks top me directly instead of wasting everyone's bandwidth?
        My didn't you get up on the wrong side of the bed this morning.
        Hmmm, why are you wasting everyone's bandwidth for personal attacks?
        I didn't post any code
        Did I say you should have? I don't think so.
        I didn't see anyone suggest using strict so I added that to the advice given the OP.
        Indeed. And that's exactly why I am ranting. Noone else suggested to use strict because that was not relevant to the problem. Noone suggested the OP to not eat uncooked meat that was left in the sun for a few hours either. Should someone have posted that as well? I mean, it's excellent advice, noone suggested that yet, and wouldn't have helped less to solve the OP's problem as your suggestion did.
        Also I don't feel that personal attacks on me are warranted.
        Personal attacks? My, my. You start off with Also why rant anonomyously?, and I point out that you're as anonymous as I am, and that's suddenly a personal attack? Get off your high horse buddy, you're not interesting enough for a personal attack. But it sure sounds that you got out off the wrong side of the bed.