Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Display shortened paragraph

by jbrugger (Parson)
on Feb 01, 2006 at 05:58 UTC ( [id://526973]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my $n = 20;
    $txt =~ m/(.{$n})/gs;
    print $1;
    
  2. or download this
    #!/usr/bin/perl -w
    
    ...
    for (my $i=0; $i<20; $i++) {
        print $a[$i];
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-24 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found