in reply to Explanation of complicated line?

I'm guessing that's a typo: the if(...); looks suspiciously like a modifier, and the \ key is awfully close to the enter key. So:

$headline = $stream->get_trimmed_text('/b') if $tag->[1]{class} =~ /^h[12]$/);

--
:wq

Replies are listed 'Best First'.
Re: (FoxUni) Re: Explanation of complicated line?
by TrinityInfinity (Scribe) on Apr 02, 2002 at 21:20 UTC
    That's the solution I was looking for.... I thought it was some complicated substitution that depended upon the '\' character for something...but surely enough, just a typo. Things are peachy now! Much thanks...
      Looks like a bad habit developed by a bash programmer, as bash gets really upset if you don't "literal" your newlines . The backslash means, roughly, "continued on next line".

      Perl, fortunately, understands what you mean when you split lines for readabilty. You can even split your quotes, such as:
      my $foo = "This Is Rather Poetic";
      Which, for comparison, is not so easy in something like C:
      char *foo = "This\ Is\ Rather\ Tedious";

        Um, no. At least on gcc 2.9.3:

        char* foo = "This\ is\ rather\ tedious";

        produces the string "Thisisrathertedious", and:

        char* foo = "This is rather poetic";

        produces what you're getting from your Perl example.

        Don't knock C for the wrong reasons.

        --
        :wq