in reply to extracting a substring?
#!/usr/bin/perl -w use strict; my $look_for = 'foobar'; my $string = 'this whole script is foobared'; my $result = substr($string,index($string,$look_for),length($look_for) +); print $result;
grep$str =~ /(Version\s+\d+\.\d+)/; $result = $1;
|
|
|---|