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 Lcm of root2 and 2?
What is the angle between the two hands of a clock when time is 8:30
Girish invested a certain amount at the rate of 8% p.a. for 6 year to obtain an amount of Rs. 28046.How much amount did Girish obtain as simple interest?
If the ticket sales s for a company increases 25% from standard sales to 60 tickets sold, then 60 - s =:
WHAT WOULD BE THE POSSIBLE APTITUDE QUESTIONS FOR THE HR EXECUTIVE OR FOR THE SR HR EXECUTIVE ?????
Fresh Grapes contain 90% water by wt. Dried grapes contain 20% water by %age. What will b wt of dried grapes when we begin with 20 kg fresh grapes
A person walking 5/6 of his usual rate is 40 minutes late. What is his usual time?
14.60 x ? + 13.5 = 50
Thirty men take 20 days to complete a job working 9 hours a day.How many hour a day should 40 men work to complete the job? (a) 8 hrs (b) 7 1/2 hrs (c) 7 hrs (d) 9 hrs
5 Answers Infosys, Thomson Reuters,
A fold density is 19 times greater than the water and for copper it is 9 times.At what ratio you can mix gold and copper to get 15 times denser than water.
WHAT HAPPENS WHEN SQUARE PULSE IS GIVEN TO THE INPUT OF THE TRANSFORMER
11 Answers Bhel, GAIL, L&T,
if 2 miles of fence enclose a square plot of 160 acres,how large a square will 4 miles of fence