Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Creating an abstract

by tybalt89 (Monsignor)
on Aug 09, 2021 at 21:38 UTC ( [id://11135749]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
      my $text = s/^.{0,$len}\b\K.*//sr =~ s/<[^<>]*\z//sr . '...';
      dd $text;
      }
    
  2. or download this
    "text <one 1> three <two 2> ..."
    "text <one 1> three <two 2> four..."
    ...
    "text <one 1> three <two 2> four <five 5> K <six 6> ..."
    "text <one 1> three <two 2> four <five 5> K <six 6> ..."
    "text <one 1> three <two 2> four <five 5> K <six 6> lastword..."
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 20:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found