Answer Posted / 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 |
Post New Answer View All Answers
i need icet solved papers 2000 to 20010,and also mock papers,mock online
cgl2010 tier 2 ki merit kya rhgi
The house is big and lovely but since nobody uses it it is pretty much a white Elephant What does White Elephant mean?
Find the value of the 678 to the base 7.
A person spending out 1/3 for cloths , 1/5 of the remaining for food and 1/4 of the remaining for travellers is left with Rs 100/- . How he had in the beginning ?
A person was fined for exceeding the speed limit by 10 mph. Another person was also fined for exceeding same speed limit by twice the same. If the second person was travelling at a speed of 35 mph, find the speed
Four persons can cross a bridge in 3, 7, 13, 17 minutes. Only two can cross at a time. Find the minimum time taken by the four to cross the bridge.
A Fraction has the denominator greater than its numerator by 4. But if you add 10 to the denominator, the value of the fraction would then become 1/8. What is the fraction. 1/5,3/7,1/3,2/6
if a man byes 1 lt of milk for 12 rs and mixes with 20% of water and sels it for rs 15 thgen what is percentage of gain
How many mashes are there in a sq. m of wire gauge. Each mesh being 8mm long X 5mm width
A, B, C, D, E, F, G, H, I are all of squares which are combined in a square. Area of B is 81 cm2. Side of A is 1 cm. Then find area of I?
There are 3 societies a,b,c. a lent tractors to b and c as many as they had. After some time b gave as many tractors to a and c as many as they have. After sometime c did the same thing. At the end of this transaction each one of them had 24. Find the tractors each originally had.
chief : tribe :: governor :
If m/n = 5/4 , then 2m+n= ?
in a mixture, R is 2 parts, S is 1 part. in order to make S to 25% of the mixture, howmuch R is to be added