in reply to Fetching a number
Just switch the comments for my $number depending on if it will always be a 3 digit number or not.#!/usr/bin/perl -w use strict; my $string = qq{('AA','B','2','ProjectId','148')">Unique Information H +ere (Index)}; my $number = substr($string,27,3); #my $number = substr($string,27,index($string,"'",27) - 27); print "$number\n";
Cheers - L~R
|
|---|