
mhinkle
New User
Oct 1, 2012, 10:37 AM
Post #1 of 3
(2077 views)
|
Mr.BlindNewB regarding spacing
|
Can't Post
|
|
Hello, I have just started to learn Perl. I am not a programmer (yet). All of the examples I find have no spaces between lines and I am getting older so its harder for me to see and thus understand, :( so I’d like to add spaces (newlines, whitespace) in my programs—is this acceptable? I am including an example below of a program example I found and the way I have modified it to make it easier for me to understand and see. Can someone tell me if these two scripts will produce the EXACT same results? Or if my modifications change the functionality of it? Original: #!/usr/bin/perl @lines = `perldoc -u -f atan2;`; foreach (@lines) { s/\w<([^>]+)>/\U$1/g; print; } Modified: #!/usr/bin/perl @lines = `perldoc -u -f atan2;`; foreach (@lines) { s/\w<([^>]+)>/\U$1/g; print; }
|