Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: hiccoughing here documents

by AnomalousMonk (Chancellor)
on Aug 11, 2017 at 18:20 UTC ( #1197282=note: print w/replies, xml ) Need Help??


in reply to hiccoughing here documents

Not very pretty IMHO, but maybe something like:

use warnings; use strict; my $n = 5; my $s = <<EOS; line 1 line two ${ \ join "\n", ("repeated line tres") x $n } line penultimate line the last EOS print "[[$s]]";
Output:
c:\@Work\Perl\monks\Anonymous Monk\1197277>perl hiccup_here_1.pl [[line 1 line two repeated line tres repeated line tres repeated line tres repeated line tres repeated line tres line penultimate line the last ]]
(The explicit join statement | expression could become a call to a function returning any string.)


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2018-09-21 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (185 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 18:53 UTC) Welcome new users!