Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: print an array for paragraphs

by lestrrat (Deacon)
on Aug 20, 2001 at 23:52 UTC ( [id://106342]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
          my $str = "1\n2\n3\n4";
          my @tokens = split( /\n/, $str );
          # now tokens contain
          # ( "1", "2", "3", "4" ), NOT ( "1\n", "2\n", "3\n", "4\n" )
    
  2. or download this
        my $para = ..... # whatever.
        # so $para is ( possibly ) a multi-line parameter
    ...
        if( $para =~ /mSOriginating/ && $para =~ /$msisdn/ ) {
               print $para;
         }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://106342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-07-21 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.