Blank Lines in a Perl Script
Hi all,
I am a total newbie at Perl and was just asking if there is a way to add line spaces when asking for user interaction in a script. For example: Code:
SPACE Code:
echo "" Sorry if its a dumb question to most of you all. Thanks in advance. |
Hello,
You could use a standard regular expression within your print statement, such as \n which means new line. For a list of all regular expressions used, see here: http://www.ryerson.ca/perl/manual/pod/perlre.html Cheers, Josh |
Thanks I will check that out.
|
No problem! If you have any more questions, feel free to ask. Mark my posts helpful if you feel the need to also, thanks!
Josh |
Quote:
Small amendment for completeness' (& correctness') sake: "\n" in the context of print (or any string, really) is simply an escape sequence, not a regular expression; while the escape sequence has a meaning in REs (same meaning as in a string, matching a newline) it is NOT an RE in this context. Cheers, Tink |
Quote:
Cheers, Josh |
All times are GMT -5. The time now is 01:18 AM. |