We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems undefining $/ affects the behaviour of the lines method.
$/
lines
$ echo -e "a\nb\n" > foo; perl -MPath::Tiny -wlE 'local $/; print scalar path("foo")->lines' 1
Is this wanted behaviour? I just spent some time debugging an issue with a call to lines deep into code and further out $/ was localized.
Personally I use stuff like Path::Tiny to avoid "clever" globals like $/ having any impact.
If this is intended behaviour, should it be possible to tell lines to ignore $/ or set a custom line-ending character?
If not, should one always define $/ to wanted value before using lines?
And I guess no matter what, the current behaviour of respecting $/ should perhaps be clearly documented.
The text was updated successfully, but these errors were encountered:
I think you're right that $/ should be ignored.
Sorry, something went wrong.
No branches or pull requests
It seems undefining
$/
affects the behaviour of thelines
method.Is this wanted behaviour? I just spent some time debugging an issue with a call to
lines
deep into code and further out$/
was localized.Personally I use stuff like Path::Tiny to avoid "clever" globals like
$/
having any impact.If this is intended behaviour, should it be possible to tell
lines
to ignore$/
or set a custom line-ending character?If not, should one always define
$/
to wanted value before usinglines
?And I guess no matter what, the current behaviour of respecting
$/
should perhaps be clearly documented.The text was updated successfully, but these errors were encountered: