Require another perl file : require « Language Basics « Perl






Require another perl file

      


# parent.pl

#!/usr/bin/perl
use warnings;
use strict;

my $text = "This is the parent";

require 'child.pl';
print "$text \n";   # produces "This is the parent"

   
    
    
    
    
    
  








Related examples in the same category