Types of attribute and then describe it.
Answer / mahesh
use Attribute::Types;
my $count : INTEGER; # Can only store an integer
my $date : INTEGER(1..31); # Can only store an int
between 1..31
my $value : NUMBER; # Can only store a number
my $score : NUMBER(0.1..9.9); # Can only store a num
between 0.1..9.9
my @rain : NUMBER; # Elements can only
store numbers
my %vars : SCALAR; # Entries can only
store scalar refs
my %handler : CODE; # Entries can only
store sub refs
my $arr : ARRAY; # Can only store array ref
my @hashes : HASH; # Elements can only
store hash refs
my $glob : GLOB; # Can only store a
typeglob ref
my $pattern : REGEX; # Can only store a qr'd
regex
my $ref2 : REF; # Can only store a
meta-reference
my $obj : Type(My::Class); # Can only store
objects of (or
# derived from) the
specified class
my $x : Type(/good|bad|ugly/); # Can only store
strings matching
# the specified regex
sub odd { no warnings; $_[0]%2 }
my $guarded : Type(&odd); # Can only store values
for which
# odd($value) returns true
| Is This Answer Correct ? | 0 Yes | 0 No |
what is the next number in the series 3,26,15,124,
The cycle has following specifications: The rear derailer is on the 14 tooth gear and the front derailer is on the 52 tooth gear. The rear gear has 14 teeth. The diameter of the rear wheel is 27". If a cyclist pedals at 75 revolutions per minute, then what will be the speed achieved?
A car is filled with 4.5 gallons of fuel for a round trip . Car is taken 1/4 more than in going than coming up. What is the fuel consumed in coming up ?
The passage implies that a moral principle derived from applying Murphy's philosophy to a particular group would be applicable to another group if
1) 1)difference between ip and non ip protocol.
CROSS+ROADS=DANGER.what is the value of D+A+N+G+E+R ?
The average salary of Ram, Shyam and Sundar is 95 Rs. per week. If Ram earns Rs.115 and Shyam earns Rs.65.What is the salary of Sundar.
In a queue, a man is standing at the position 10th from the front and 15th from behind. How many persons are standing in the queue?
Find sum of 3 + 5/(1+22) + 7/(1 + 22 + 32) + ......
(165)2 - (164)2 =
who is frist chief commissioner of income tax in india
By selling 1 dozen ball pens, a shopkeeper earned the profit equal the profit equal to the selling price of 4 ball pens. His profit percent is? a)50 b)40 c)33 1/3 d)31 1/4 plz specify reason... thanks