Hi All,
I am still slugging it out. Many thanks to those that have helped me thus
far. :-)
Having written the following code I am now troubled by v_feet_str or
v_inch_str being undefined. If there is no match can I return a default
value? In my case if there is no dimension then I want to move ahead using a
zero in that position.
($v_dim1_str, $v_dim2_str) = split(/\s*x\s*/i, $v_size_str);
# Now split dimension one into feet and inch parts.
#my ($v_feet_str, $v_inch_str) = split(/(?:'|")/, $v_dim1_str);
$v_dim1_str =~ /\s*([\d\.\s\-\/]+)\s*'\s*([\d\.\s\-\/]+)\s*"/;
my ($v_feet_str, $v_inch_str) = ($1, $2);
print "Dimension 1\n";
print " Feet: $v_feet_str\n";
print " Inches: $v_inch_str\n";
Kind Regards,
Keith
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>