Hi Guys,
I am trying to extract and print a string, which also includes a 'period'. I want all the text before the 'period' sign. For example, the text looks like:
SREI120RE04.
SREI5151RE04.
SREI5151RE05.
SREI5151RE06.
I want to print only text before the period sign, so my output will be:
SREI120RE04
SREI5151RE04
SREI5151RE05
SREI5151RE06
I am trying the following code, but it is not working:
($site is where the above string is defined)
@value=split({$site},".")[1];
foreach $worstation (@value)
{
print "$counter $worstation $date \n";
}
Please suggest and help.
Thanks in advance.
I am trying to extract and print a string, which also includes a 'period'. I want all the text before the 'period' sign. For example, the text looks like:
SREI120RE04.
SREI5151RE04.
SREI5151RE05.
SREI5151RE06.
I want to print only text before the period sign, so my output will be:
SREI120RE04
SREI5151RE04
SREI5151RE05
SREI5151RE06
I am trying the following code, but it is not working:
($site is where the above string is defined)
@value=split({$site},".")[1];
foreach $worstation (@value)
{
print "$counter $worstation $date \n";
}
Please suggest and help.
Thanks in advance.