catfish1116 has asked for the wisdom of the Perl Monks concerning the following question:
In the code below, the if statement is not matching on any non-whitespace characters. Where is my mistake at?
print "Enter a fragment of a web address to see if it is a match fo +r the correct web site: "; chomp (my $fragment = <STDIN>); print "\n"; if ($fragment =~ m{http:// (S+) } ) { print "That is a good match for the URL\n"; } else { print "THat is not a good a match\n"; }
TIA The Catfish
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Non White space function
by ikegami (Patriarch) on Jul 17, 2020 at 21:21 UTC | |
|
Re: Non White space function
by haukex (Archbishop) on Jul 17, 2020 at 21:21 UTC | |
by ikegami (Patriarch) on Jul 17, 2020 at 21:29 UTC | |
|
Re: Non White space function
by hippo (Archbishop) on Jul 18, 2020 at 08:51 UTC | |
by AnomalousMonk (Archbishop) on Jul 18, 2020 at 15:25 UTC |