mystart($LumberFile); sub mystart { my ($file) = @_; open( my $fh, "> $file" ) or die ... #### #!/usr/bin/perl use warnings; use strict; use VRML; my $Dir = "vrmlstuff"; my $Subdir = "DrillPressTable"; my $LumberFile = "$Dir/$Subdir/lumber.wrl"; mystart($LumberFile); sub mystart { my ($file) = @_; open my $fh, '>', $file or die "ERROR: Unable to open $file for output"; my @lines = split /\n/, <## #!/usr/bin/perl package VRML; use warnings; use strict; use Exporter 'import'; our @EXPORT = qw/printout/; sub printout { my ($lines, $fh) = @_; $fh = *STDOUT unless $fh; for my $line ( @{$lines} ) { print $fh "$line\n"; } } 1;