Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Remove redundant $. code fragments. #23

Closed

Conversation

keithrbennett
Copy link

The $. code fragments removed in this PR had no effect on the output, so I figured removing them would simplify the examples.

I did not presume to know if doing the same in Perl would similarly have no effect, so I didn't modify the comments above those lines, but put a TODO there to alert us of the need to address it. If you like you can tell me how to modify those lines and I will do so.

@keithrbennett keithrbennett changed the title Remove redundant $. code fragment. Remove redundant $. code fragments. Dec 30, 2018
@learnbyexample
Copy link
Owner

>> 'qty'.to_i
=> 0

They just happen to work for those instances because the header field didn't have numbers and the comparison for 0 in both cases happened to align favorably.

Also, those two examples of $. are specifically there to demonstrate how to retain or ignore header lines.

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

Successfully merging this pull request may close these issues.

2 participants