Skip to content
New issue

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

Feature request: slurp_* support for chomp argument #281

Open
kcaran opened this issue Dec 20, 2022 · 0 comments
Open

Feature request: slurp_* support for chomp argument #281

kcaran opened this issue Dec 20, 2022 · 0 comments

Comments

@kcaran
Copy link

kcaran commented Dec 20, 2022

I've been working on Advent of Code and ran into a bug in my program. When reading in a file into a string I've been using:

my $input = Path::Tiny::path( $input_file )->slurp_utf8( { chomp => 1 } );

But I've discovered that chomp has no effect on slurp! My $input is terminated with a new line, even though there isn't one in the input text file.

Am I crazy to think I should be able to do this? I'd love to be able to contribute a pull request, but am I missing a reason for not being able to do this? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant