Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Things you think you'll never use.

by redlemon (Hermit)
on Jan 21, 2005 at 15:25 UTC ( #424001=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     (??{ code })
        ...
    ...
        subexpression may match. The result of evaluation is
        considered as a regular expression and matched as if
        it were inserted instead of this construct.
    
  2. or download this
       1 while s!([BUI])(<+)\s*(.*?)\s*(??{'>' x length $2})!<$1>$3</$1>!;
    
  3. or download this
       "B<<< I<< U<bold underlined text> >> >>>"
    
  4. or download this
      <B><I><U>bold underlined text</U></I></B>
    
  5. or download this
    my $pod2html = qr/
      ([BUI])                  # start of formatting pattern
    ...
      \s*(.*?)\s*              # collect text, without border space
      (??{'>' x length($2)})   # match same number of closing braces
    /x;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://424001]
Approved by sschneid
Front-paged by thor
help
Chatterbox?
[Corion]: ambrus: Yeah, hopefully it's that
[1nickt]: I am stumped, maybe someone brainy can clear my mind?
[1nickt]: This code does what I expect on the CLI: perl -wE 'sub x { 0 and 1 } say x()'
[1nickt]: (prints "0")
[Corion]: Hi 1nickt!
[1nickt]: When I put it in a file, I get the following: "Replacement list is longer than search list at 1290.pl line 4. syntax error at 1290.pl line 4, at EOF ...
[1nickt]: ... (Might be a runaway multi-line ;; string starting on line 3)"
[erix]: ( ha, the inmates of the retirement home have taken the kids to the cafe -- Good! :) )
[1nickt]: (there are three lines in the file)
[erix]: na namesti ( "At The German" ? )

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2017-12-12 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (332 votes). Check out past polls.

    Notices?