Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: C vs perl

by Ovid (Cardinal)
on Apr 28, 2002 at 06:16 UTC ( #162623=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub MakePtag{
      my $fixme = shift;           # take in our parameters
    ...
        grep { /\S/ }              # must have at least one non-whitespace
    + character
        split "\r\n", $fixme;      # break apart on the newlines
    }
    
  2. or download this
    sub MakePtag { join "\r\n", map {"<p>$_</p>"} grep {/\S/} split "\r\n"
    +, $_[0] } # :)
    
  3. or download this
    sub MakePtag{
      chomp(my $fixme = shift;)    # take in our parameters
    ...
      $fixme = "<p>$fixme</p>";    # Add beginning and ending tags
      return $fixme;                
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://162623]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-11-24 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (346 votes). Check out past polls.

    Notices?