Hi, thanks for your reply. I did change now but still it prints output as '1', if you see my print statement I want to get the output as ORA-12505 in this scenario, but still not getting it right.
#!/usr/bin/perl my $org = ""; $Ora_code = 'Failed tthe following error: ORA-12505, TNS:listener does + not currently know of SID given in connect descriptor'; print $Ora_code; if ( my ($out) = $Ora_code =~ /ORA\-\d{5}/) { print "inside\n"; print $out; } else { print "(no match)\n"; }
In reply to Re^2: how to get output
by dbashyam
in thread how to get output
by dbashyam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |