I have a main script MAIN.pl
I want to call all my five subscripts :
SUBSCRIPT1.pl
SUBSCRIPT2.pl
SUBSCRIPT3.pl
SUBSCRIPT4.pl
SUBSCRIPT5.pl
to may main script MAIN.pl . All this script will have a return value like true or false . depending on this input " if all the subscripts pass then we have to print pass to the Main script ".
I am new to perl . Please help me in this .
Main program :::
Expand|Select|Wrap|Line Numbers
- use strict;
- use warnings;
- my $result = 'fail';
- print "How old are you? ";
- my $age = <STDIN>;
- if ($age < 13) {
- print "You are too young for this\n";
- print $age;
- $result = 'pass';
- exit ;
- }
one such subscript :
Expand|Select|Wrap|Line Numbers
- use strict;
- use warnings;
- # my $scar = system "perl script.pl";
- my $scar = `perl script.pl`;
- print " $scar \n";