#!/usr/bin/perl -w use strict; #open(IN, "data1.tab") || die $!; # while() { # print "line is $_"; # my @line = split(/\s+/,$_); # print "the array is @line\n"; # print "range is ", $line[2] - $line[3], "\n"; # } my $string = 'a big dog sat on the porch'; my @list = split(/\s+/,$string); print "list is ", join(',', @list), "\n"; my @list2 = split(/a/,$string); print "list is ", join(',', @list2), "\n"; print "string is ", join('a', @list2), "\n";