utku has asked for the wisdom of the Perl Monks concerning the following question:
The code shows all DATA. However, if I put use Switch; after shebang, the code doesn't run printf at all. It seems the core module Switch has an effect on DATA processing. I could not find anything in the documents.. Do you recommend me to use given()/when() instead of Switch? Regards.#!/usr/bin/perl -w while (<DATA>) { $str = $_; chomp $str; print "str=$str\n"; } __DATA__ e-2 ddfgdgdf e-3 e-4 dfgrty5r6y56 e-5 e-6 e-8
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: effect of Switch module on DATA
by Athanasius (Archbishop) on Aug 23, 2013 at 08:15 UTC | |
by tobyink (Canon) on Aug 23, 2013 at 09:15 UTC | |
|
Re: effect of Switch module on DATA
by Pizentios (Scribe) on Aug 23, 2013 at 13:22 UTC | |
|
Re: effect of Switch module on DATA
by Lotus1 (Vicar) on Aug 23, 2013 at 17:01 UTC | |
by utku (Acolyte) on Aug 27, 2013 at 11:00 UTC |