#!/usr/bin/perl -w use strict; #case 1 my @matches = "hello awesome" =~ /(el).*(om)/; print "@matches\n"; #prints el om #case 2 @matches = "hello awesome" =~ /(el)(.*)(om)/; print "@matches\n"; #prints el lo awes om # (el)(lo awes)(om) #case 3 nonense!!! #print pop @awesome; #nonsensical ! #there is no array "awesome" and #therefore there is nothing to "pop" from. #case 4 @matches = split (/\s/,"hello awesome"); print "@matches\n"; #prints" hello awesome"