HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/libtext-reform-perl/examples/demo_reentrant.pl
#! /usr/bin/perl -w

use Text::Reform;

sub igpay_atinlay {
	return $2.$1.'way' if $_[0] =~ /^([aeiou])(.*)/;
	return $2.$1.'ay'  if $_[0] =~ /^(.)(.*)/;
}

$original = 
"Here is a piece of text of no special account, signifying
 nothing of consequence, existing solely to demonstrate a
 useful application of the re-entrant nature of form";

($translation = $original) =~ s/([^\s,]+)/igpay_atinlay($1)/ge;

print +form 
        "||||||||||||||||||||||||||||    |||||||||||||||||||||||||||||",
        scalar form("[[[[[[[[[]]]]]]]]]",$original),
        scalar form("[[[[[[[[[[[[[[[]]]]]]]]]]",$translation);