in reply to Where to put self-made loop logic (separate module)?

Nowhere?

From your description it doesn't sound special :) sounds like

while( $$ref =~ m{^(.*$)$}gsm ){ my $line = $1; ... }
and IMHO that doesn't need a module

OTOH see See Simple Module Tutorial and Modern Perl and Re^2: Write to existing file with character insert

Replies are listed 'Best First'.
Re^2: Where to put self-made loop logic (separate module)?
by Anonymous Monk on Dec 28, 2012 at 23:10 UTC
    haha ;) //gm not /s