in reply to Re: Re: pattern matching
in thread Creating a regex to match part of a URL's domain name (was: pattern matching)

You're not doing any rudimentary data-checking, or you'd see that my $string = @_ was assigning a number to your variable.
# try one of these: my ($string) = @_; my $string = shift; my $string = $_[0];


japhy -- Perl and Regex Hacker

Replies are listed 'Best First'.
Re: Re: Re: Re: pattern matching
by strfry() (Monk) on Jun 06, 2001 at 20:15 UTC
    aha! but what if i want to use
    my $variable = "http://www.google.com"; ? does this subroutine not handle "/"'s?
        well, when i do "my ($string) = _@;" it works nicely, except when $string contains http:// whats ($variable) do anyhow?
      ok, now that i've embarrassed myself.. (:
      i figured a way around it; i just simply left out http:// and placed it statically in another portion of the code; i can always make a workaround if i need to link to, say, something with an ftp:// protocol heading. (:
      sorry for all the mess and frustration (although most of it was likely on my part hehe)
      thanks!
      strfry()