#!/usr/bin/perl -- use strict; use warnings; my $str="himanshu.txt^@"; if($str =~ /(\w+)/) { $str = "$1.$2"; } print "$str\n" __END__ Use of uninitialized value in concatenation (.) or string at - line 6. himanshu. #### #!/usr/bin/perl -- use strict; use warnings; use re 'debug'; my $str="himanshu.txt^@"; if($str =~ /(\w+)/) { $str = "$1.$2"; } print "$str\n" __END__ Compiling REx `(\w+)' size 7 Got 60 bytes for offset annotations. first at 4 1: OPEN1(3) 3: PLUS(5) 4: ALNUM(0) 5: CLOSE1(7) 7: END(0) stclass "ALNUM" plus minlen 1 Offsets: [7] 1[1] 0[0] 4[1] 2[2] 5[1] 0[0] 6[0] Matching REx "(\w+)" against "himanshu.txt^@" Matching stclass "ALNUM" against "himanshu.txt^@" Setting an EVAL scope, savestack=5 0 <> | 1: OPEN1 0 <> | 3: PLUS ALNUM can match 8 times out of 2147483647... Setting an EVAL scope, savestack=5 8 <.txt^@> | 5: CLOSE1 8 <.txt^@> | 7: END Match successful! Use of uninitialized value in concatenation (.) or string at test.pl line 7. himanshu. Freeing REx: `"(\\w+)"'