>>>>> "SHC" == Shawn H Corey <shawnhco...@gmail.com> writes:
SHC> On 10-05-20 03:17 PM, Uri Guttman wrote: >>>>>>> "SHC" == Shawn H Corey<shawnhco...@gmail.com> writes: >> SHC> On 10-05-20 02:07 PM, Uri Guttman wrote: >> >> not a major point, but why do you use dumper just to print a list of >> >> tokens? i use dumper for deeper stuff where i can't just print the data >> >> easily without some code. even single level hashes i will print directly >> >> as i can format it my way and not dumper's. >> SHC> I have a script called template.pl: >> SHC> use Data::Dumper; >> SHC> Whenever I need to do a quick script, I copy it and modify it. Dumper SHC> is already there. >> >> but few people use templates like that (emacs supports it as do other >> editors). my point is that dumper is overkill for simple dumps of >> values. you don't use it to print scalars? arrays aren't much more and >> map works well. and as i said, you can control the output much better >> with map than dumper. this is not against dumper which i use all the >> time, just to point out to others that using it for simple prints is not >> always needed. >> >> uri >> SHC> I don't use it for the final output at all. I use it to see what's SHC> inside a variable. As I said, this is a quick script. Since the code SHC> comes cheap (it's copied), I use what's there. i didn't say it was for output but for debugging. and i didn't say YOU shouldn't do it. i wrote for others to learn when to and not to use Dumper. it isn't always the best choice. you can use it all the time. they don't need to. simpler print/map is fine for them. and most won't have source templates SHC> BTW, I don't have my editor set up for templates; I just copy the file SHC> on the command line. you already said that. i was telling OTHERS that emacs and some editors can do this for you automatically. saves a cp command. get this again, i am telling others about these alternatives, not telling you what to do. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/