I need some help. I have figured out most of my script but I need to search a string and see if it starts with certain characters and Does not end in another.
[$line1 = "EB*1**96" #should produce true value and blank line]
[if ($line1 =~ /^EB\*/ and $line1 ne /Y$/) {$line1 = "";}]
[print $line1]
Should print blank line or nothing
[$line1 = "EB*1**96*Y" #should produce False ]
[if ($line1 =~ /^EB\*/ and $line1 ne /Y$/) {$line1 = "";}]
[print $line1]
Should print EB*1**96*Y
I need to blank the line if it starts with EB* and the string does not end in Y
Any help would be appreaciated