in reply to Re^4: Best practice or cargo cult?
in thread Best practice or cargo cult?
It actually makes sense a lot of the time
Do you have any examples? I can't think of anything realistic.
-
When dealing with line data, I'd be in a while (<FILE>) { chomp; ... } loops, so my data would never have any \n in it.
-
When dealing with data where \n is considered whitespace, it's no more special than a space, so I'd use the s modifier.
-
When dealing with multiline records, I tend to treat the data as line data — especially if I can use the flip-flop (..) operator — so my data would never have any \n in it. This is probably where I'd be least likely to use the s modifier.
-
When dealing with binary data, \n is not special, so I'd use the s modifier.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Best practice or cargo cult?
by Juerd (Abbot) on Jun 21, 2006 at 01:04 UTC | |
by ikegami (Patriarch) on Jun 21, 2006 at 04:05 UTC |