in reply to Canonical regexp for urls beginning with http://
works.#!/usr/local/bin/perl -w use strict; my $file = "/export/home/ssesar/example"; my $line; open (FILE, $file) || die "\n$!"; while ($line = <FILE>) { chomp $line; if ($line =~ m/^http\:\/\//) { print "line = $line\n"; } else { print "Sorry, dude\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Canonical regexp for urls beginning with http://
by merlyn (Sage) on Feb 22, 2001 at 02:52 UTC | |
by Tuna (Friar) on Feb 22, 2001 at 03:04 UTC |