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: Regular Expressions:
printing a space or newline

 



ronald29x
New User

Aug 14, 2005, 9:02 PM

Post #1 of 3 (2812 views)
printing a space or newline Can't Post

can somebody help me, i want to know what are methods to print a space or newline in perl.
this is some of them that i know, can you give me another way? thanks
print "abc ";
print "abc"." ";
print "abc\n";
print "abc"."\n";
print "abc".$/;


rork
User

Aug 15, 2005, 8:30 AM

Post #2 of 3 (2809 views)
Re: [ronald29x] printing a space or newline [In reply to] Can't Post

you can use the chr method to create a newline or space.
--
Don't reinvent the wheel, use it, abuse it or hack it.


KevinR
Veteran


Aug 15, 2005, 11:04 AM

Post #3 of 3 (2807 views)
Re: [ronald29x] printing a space or newline [In reply to] Can't Post

print 'abc' .= "\n";
print 'abc' .= ' ';
-------------------------------------------------

 
 


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

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