Guest User

Untitled

a guest
Jul 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # With ternaries
  2. $nl = $separator2 ?? $remainder eq "\n" ?? $remainder
  3. !! $separator2
  4. !! $separator;
  5.  
  6. # Original
  7. if $separator2 {
  8. if $remainder eq "\n" {
  9. $nl = $remainder;
  10. }
  11. else {
  12. $nl = $separator2;
  13. }
  14. }
  15. else {
  16. $nl = $separator;
  17. }
Add Comment
Please, Sign In to add comment