Need Perl Script to extract last octent of an Argument
Hi,
I need Perl script to extract last octent of third Argument in command line. Eg: ./filename.pl linux 2.6.26 Now i need to extract last octent 26 in third argument (ie., 2.6.26). can anyone help on this? |
This is one way to do it:
Code:
my $number = $ARGV[1]; Code:
my ($first, $second, $third) = split /\./, $ARGV[1]; |
Is this homework? What have you tried so far?
|
All times are GMT -5. The time now is 11:02 AM. |