Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Creating an abstract

by tybalt89 (Prior)
on Aug 09, 2021 at 21:38 UTC ( #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? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2022-05-24 00:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?