Hi,
I have 3 lines in a text and i want to indent the 2nd line of the text. How can i do that in html?
Here is the text.
1: XYZ. 2009 Jul 14.
Perl is a scripting language. Perl is a high-level, general-purpose, interpreted, dynamic programming language
ID: 2547999
The output should be:
1: XYZ. 2009 Jul 14.
Perl is a scripting language. Perl is a high-level, general-purpose, dynamic
programming language
ID: 2547999
How to indent this 2nd line?
Any idea???
Regards
Vanitha
It depends on how exactly you print the second line. Do you want tab or 4/8 spaces ? If you can use that in the print function, for example :
[root@server:~]$ perl -e 'print "\ttest\n"';
test
[root@server:~]$
Notice the tab space before the test string. You can also grab the whole text and put in into EOF, as in :
print <<EOM;
test
test
test
EOM
This will print the data exactly in the way you have formatted it.
For more advanced tasks you can use perltidy.
HTH.
Update : Oh, I just saw the post was one week old, I hope it's not too late.