All pastes #976430 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-08 04:08 UTC
rendered paste body
#!/usr/bin/perl
#
# Perl code for learning purposes. cuts first 10 lines off a file
# Resources:
# Existing LearningPerl scripts
# Existing LearningPerl resources
#

# Cut out niceness in favour of working.
use strict;
use warnings;

# Read a file into a variable (or die with error)
open(my $in,  "<",  "linesFile")  or die "Can't open linesFile: $!";
# Create a scalar and an array with the value of $in
my $openread  = <$in>;
close $in;

# Print array to screen
print "\nPrinting array to screen:\n";
print $openread;