Open osresearch opened 6 years ago
Potentially a more portable way to read the code is to seek on DATA instead of opening $0:
DATA
$0
#/usr/bin/perl seek DATA, 0, 0; print while <DATA>; __DATA__
My much less artistically laid-out quine-scarf-generator uses this technique:
Very nice! Thank you for the hint. Not sure if I will update this one or write a new one, aiming for “proper” quine-ness – one day… :)
Also, a beautiful piece of scarf code – extra kudos for using strict!
Potentially a more portable way to read the code is to seek on
DATA
instead of opening$0
:My much less artistically laid-out quine-scarf-generator uses this technique: