Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Interns are NOT lazy!by E-Bitch (Pilgrim) |
on Aug 17, 2001 at 02:50 UTC ( [id://105559]=note: print w/replies, xml ) | Need Help?? |
I Love being an intern... lets see if I have some mojo today....
first, break it apart on the semicolons and {}:
well, I guess that some interns are smarter than others, and I have no mojo today. :) my apologies for filling up the replies with gibberish. The part that really hung me out was that bit after __DATA__, with the pipes. (to other monks:) what is that doing? Update: WAIIIIT!!!! I just stepped back from it... pure genius... okay, so lemme get this straight... __DATA__ is being read in using the same syntax as <STDIN>??? OKay, that is cool... and then, the data is being shot through that loop? ++Interns!!! Okay... so continuing then: first, you undefined the record separator ($/), then you redefined it to the line break character ($/ = $:;), then, redefined it again to a regexp matching the whole line(?) to replace all those dashes with nothing(?) (so, i'm assuming the first time you did it was for visual effect, aka space filling?), Then, you read a line of data from __DATA__ <Still in awe that that works> then, chomp the line, and use a regexp on it... lesse what that regexp does... so, you treat the entire line as a record for the regexp, and match any number of whitespace characters, looping through the regexp and replacing said whitespace characters with nothing... from there, call the map function, with the long regexp as the first argument, and the split as the list of characters to apply the map to. from there, print it out to the screen. I know i probably missed something, but this is my first ever shot at doing this.. Update again: Thanks jynx... dont know how I missed the difference between / and \. musta been goin too fast eh? thanks! _________________________________________ E-Bitch Tempora Mutantur Nos et Mutamur in Illis "The Times are Changed Even as We are Changed in Them"
In Section
Obfuscated Code
|
|