Hi Experts, I am new to perl. The following code works fine.
#!/opt/perl/bin/perl use strict; use warnings; my $str="http://162.16.23.0"; if( $str =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/ ) { print "$1.$2.$3.$4"; } But, How to simplify the following line & print the IP in the above code?. $str =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/ Thanks, Rajan. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.592 / Virus Database: 375 - Release Date: 2/19/2004 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>