Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
You are correct, I should remove the lines "used File::Copy? Or Cwd:" since I don't know what they mean.

Perl is one of those long-established languages which has very extensive documentation. Your installation should have the perldoc command which will help but if it is not there you can use the online version instead (see how the word perldoc looks like a link? It is one!). The customary place to start is with perlintro but you can follow the "use" link in my previous post which explains in a rather dry way what that command does. You have lots of reading ahead of you!

I was copy the template from other blogs and forgot to remove them.

It's tempting when learning a new language to just copy code from somewhere else and hack it about to make it do something slightly different. However, it does pay to understand the code you are copying before you start to hack it about.

I want to use the "my $dir.." because I want to verify and make the files that I am working on are in the same directory as the Perl scrip.

Fine, but you are not using it in this example. The principle of an SSCCE is to reduce the example code to the minimum required (the first S stands for "Short"). It's a distraction to you and us so you may as well remove it for now. $dir isn't doing what you think anyway.

I used sub main because I need to the script to do multiple tasks after it is merging.

OK, but be careful about scoping. And try to avoid the particular word "main" since that's also a built-in package name in Perl and as a beginner you may get confused between warnings/errors which relate to either your "main" sub or the main package.

Keep at it - you are at the beginning of a long, winding, fascinating and ultimately fulfilling path. We all started where you are now.


In reply to Re^3: Merge the difference between two files by hippo
in thread Merge the difference between two files by hopper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found