Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: How to read the input directory from command line arguments using perl?

by haukex (Chancellor)
on Mar 22, 2017 at 08:01 UTC ( #1185418=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to read the input directory from command line arguments using perl?
in thread How to read the input directory from command line arguments using perl?

You already have all the pieces that you need:

  1. In your root node you show how you get the command line arguments.
  2. bart showed you how to
    1. get the pathname of the project.txt file using File::Basename,
    2. parse the value out of the REVISION_LOCATION: line, and
    3. turn that filename from relative to absolute using File::Spec's rel2abs, using the pathname of project.txt as the base.

If you're unsure on how to open the project.txt file instead of using the magic while(<>) that bart used, please see "Files and I/O" in perlintro.

Updated wording slightly.

Replies are listed 'Best First'.
Re^4: How to read the input directory from command line arguments using perl?
by finddata (Sexton) on Mar 22, 2017 at 11:20 UTC
    The thing which he added i understood .But the problem is am not geeting how to run the file in terminal by passing input file
      But the problem is am not geeting how to run the file in terminal by passing input file

      Sorry, I don't understand what you are asking. Could you show the problem using a short, runnable piece of code so that others can see the same problem on their computers?

      In the last 14 days you have posted a total of 77 nodes so far, 19 of which are root nodes (questions), and as far as I can tell, in many cases the responses to your questions have probably been unsatisfactory. If you take the time to read the following three pages, and use the suggestions from those pages when you ask questions, I think you will find that you will get much better and faster answers to your questions.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1185418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2020-02-18 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (75 votes). Check out past polls.

    Notices?