#!/usr/local/bin/perl # Jaime Prilusky, 2008 my $string = $ARGV[0] || "This is a sample string"; my (@array) = split(/ /,$string); # there is one space between '/' # try later with /a/ or /is/ foreach $word (@array) { print "[$word]\n"; }