Friday, 15 May 2015

How to behave version in perl? -



How to behave version in perl? -

i'm utilize windows platform , padre editor run program.

use 5.11.0;

which version behave using use warnings; utilize strict;. example

use 5.11.0; $data = 1232; print $data;

resulting error is

global symbol "$data" requires explicit bundle name @ file.pl line 2. global symbol "$data" requires explicit bundle name @ file.pl line 3. execution of t_print.pl aborted due compilation errors.

in same error resulting @ when using use warnings; utilize strict;in program.

so in every perl programme utilize version instead of using use warnings; utilize strict;

this documented in use:

use version enables features available in requested version defined feature pragma, disabling features not in requested version's feature bundle. see feature. similarly, if specified perl version greater or equal 5.12.0, strictures enabled lexically use strict.

version 5.11 experimental (it included changes led 5.12). should utilize perls version numbers (5.10, 5.12, ..., 5.20) unless know why utilize development version.

perl

No comments:

Post a Comment