That scalar string has several embedded \n, as if it is a here document. You can remove everything from the first ‘*’ to the end of the string with:
$stval =~ s/[*\n]+.+//g; # this removes all * Characters
More Related Contents:
- If condition based look up not working [closed]
- Detecting when an else block gets executed for the second time [closed]
- Why are Perl 5’s function prototypes bad?
- How can I require an optional Perl module if installed?
- Specifying file to process to Perl one-liner
- How do I run a Perl script from within a Perl script?
- How do I tell if a variable has a numeric value in Perl?
- Perl flags -pe, -pi, -p, -w, -d, -i, -t?
- What pseudo-operators exist in Perl 5?
- How does double arrow (=>) operator work in Perl?
- Why are Perl source filters bad and when is it OK to use them?
- Perl 5.20 and the fate of smart matching and given-when
- How can I convert the stringified version of array reference to actual array reference in Perl?
- How does Perl parse unquoted bare words?
- How can I interact with ClearCase from Perl?
- Perl build, unit testing, code coverage: A complete working example
- In Perl, how do I change, delete, or insert a line in a file, or append to the beginning of a file?
- In Perl, how can I find the index of a given value in an array?
- How can I run a system command in Perl asynchronously?
- How do I break out of a loop in Perl?
- Hidden features of Perl?
- “inappropriate ioctl for device”
- In Perl, how can I check from which module a given function was imported?
- How can I verify that a value is present in an array (list) in Perl?
- Demystifying the Perl glob (*)
- Why does !1 give me nothing in Perl?
- Perl Subroutine Prototyping — The correct way to do it
- Why do hash keys have different order when printing?
- How can I manually interpolate string escapes in a Perl string?
- How do I print unique elements in Perl array?