CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Printing while retaining formatting

 



tbone587
User

Jun 14, 2011, 10:09 AM

Post #1 of 3 (286 views)
Printing while retaining formatting Can't Post

Is there any easy way for me to print the below text without doing a bunch of crazy escape sequences? I am looking for something similar to a html <pre> tag.



Code
print"    __  ______   ______   __\n";                        
print" / |/ / | / ____/ / / ____ _________ _____\n";
print" / /|_/ / /| |/ / / / / __ `/ ___/ _ \/ ___/\n";
print" / / / / ___ / /___ / /___/ /_/ (__ ) __/ /\n";
print"/_/ /_/_/ |_\____/ /_____/\__,_/____/\___/_/\n";



miller
User

Jun 14, 2011, 11:19 AM

Post #2 of 3 (282 views)
Re: [tbone587] Printing while retaining formatting [In reply to] Can't Post

Use a heredoc


Code
print <<'END_TEXT'; 
__ ______ ______ __
/ |/ / | / ____/ / / ____ _________ _____
/ /|_/ / /| |/ / / / / __ `/ ___/ _ \/ ___/
/ / / / ___ / /___ / /___/ /_/ (__ ) __/ /
/_/ /_/_/ |_\____/ /_____/\__,_/____/\___/_/
END_TEXT


- Miller


tbone587
User

Jun 14, 2011, 11:31 AM

Post #3 of 3 (278 views)
Re: [miller] Printing while retaining formatting [In reply to] Can't Post

Thank you so much!

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives