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 "}"
In reply to Re^3: Simple prog isnt cooperating
by catfish1116
in thread Simple prog isnt cooperating
by catfish1116
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |