Open file modes
read lines into aray
slurpPerl 6 has a built in mode to slurp in files, that is to read the contents of a whole file into a scalar variable. examples/files/slurp_file.p6#!/usr/bin/perl6 use v6; my $filename = 'examples/files/slurp_file.p6'; my $data = slurp $filename; say $data.bytes; Copyright 2006, 2007, 2008, 2009, 2010 Gabor Szabo http://szabgab.com/ Index | TOC |