in reply to Re^2: Simple prog isnt cooperating
in thread Simple prog isnt cooperating
What I'm trying to accomplish is to pull a name from the list and print it out. I have done this various ways, but I'm trying to do this as requested in chapter 8, exercise #3 in the 'Learning Pearl' book by O'Reilly. I have corrected all of the typos that were pointed out,(very humbling that I did not pick up on that). I am still running into problems.
Thanks again, Catfish#!/bin/perl use v5.12; use warnings; my $Namelist = 'Wilma Fred Barney Betty Dino'; if ( $Namelist =~ m/(\w+a)/ { print "Matched|$<$&$>|\n"; say "The name that matched was $1 \n"; } else { print "No match: \n"; } syntax error at ./exer_8_3 line 8, near "m/(\w+a)/ {" syntax error at ./exer_8_3 line 11, near "}"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Simple prog isnt cooperating
by pryrt (Abbot) on Oct 16, 2018 at 15:52 UTC | |
Re^4: Simple prog isnt cooperating
by hippo (Archbishop) on Oct 16, 2018 at 15:38 UTC | |
Re^4: Simple prog isnt cooperating
by catfish1116 (Beadle) on Oct 16, 2018 at 18:34 UTC | |
by eighty-one (Curate) on Oct 16, 2018 at 19:37 UTC |