Hope this answers your question!!
use strict;
my $input;
#Search for "zoo" in the text that was input by the user
print "Enter your input, program checks for the word 'zoo' :";
$input= <STDIN>;
chomp($input);
if($input=~/zoo/)
{
print "success";
}
else
{
print "faiilure";
}
Hi,
I think this is what you are expecting. It splits the string into words each in a new line.
use strict;
my $str = '018:000000000000100778,010:abcdefghij,004:xx,xx,003:bbb,017:abcdefghijklmnopq,001:x';
$str =~ s/(,\d\d\d\:)/\n/g;
$str =~ s/(\d\d\d\:)//g;
print $str;
Output:
-------...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.