Mega Code Archive

 
Categories / Perl / Language Basics
 

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"