The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You can also rework this to completely eliminate the conditional Never add a slash to the print statement:
Or if you think that trailing slashes look ugly in the qw, you can have it always added to the print (and ls/glob) statement:
As an aside, I don't want to insult/piss off anyone (oh who the fuck am I kidding, this is the internet...) but after staring at this for 5 minutes my first thought was "wow... someone really has nothing better to do than troll PM with BBC". Maybe this really is the kind of perl code that someone would write after hacking extremely low-level C for however long, I wouldn't know, I am far less proficient in C than I would like to be. I know that pre-declaring a variable for every single value that might ever be needed and iterating through arrays by index is C-mentality. Still, things like print "\n";print "\n" are mind-boggling at 5 am, and I should hope that would be true in any language. Anyway... if you really are just learning perl you will find that many things are a lot simpler than you might expect with proper use of map and grep. and if not, then thank you for my daily dose of wtf did i just read? $,=qq.\n.;print q.\/\/____\/.,q./\ \ / / \\.,q. /_/__.,q.. Happy, sober, smart: pick two. In reply to Re: Loop Control
by xyzzy
|
|