#! /usr/bin/env perl use strict; use warnings; use Getopt::Long qw( GetOptions ); GetOptions( 'root=s' => \my $input_dir, 'outdir=s' => \my $output_dir, 'file=s' => \my $mapfile, ) In the above i called the directory straightly from the location but my question is first i should read the project.txt file from one location and from that project.txt file i should read the directory(i.e the line starts with REVISION_LOCATION).How can i script it using perl?