Skip Menu |
 

This queue is for tickets about the File-Slurp CPAN distribution.

Report information
The Basics
Id: 76598
Status: new
Priority: 0/
Queue: File-Slurp

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: edit_file_lines and $.
Download (untitled) / with headers
text/plain 365b
When in a "while(FH)" loop, Perl sets the variable "$." to be the current line number. It would be nice if edit_file_lines did the same. Seems as easy as replacing this: my @edited_data = map { $edit_code->(); $_ } @$existing_data ; with this: my $line_number = 0; my @edited_data = map { local $. = ++$line_number; $edit_code->(); $_ } @$existing_data;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.