As @ThisSuitIsBlackNot says it looks like the delimiter is stored anywhere.
This is how perl.c stores the -F
option
case 'F': PL_minus_a = TRUE; PL_minus_F = TRUE; PL_minus_n = TRUE; PL_splitstr = ++s; while (*s && !isSPACE(*s)) ++s; PL_splitstr = savepvn(PL_splitstr, s - PL_splitstr); return s;
And then lexer generates code
LINE: while (<>) {our @F=split(q\0,\0);
However, this is of course compiled, and if you run it using B :: Deparse, you will see what is stored.
$ perl -MO=Deparse -F/e/ -e '' LINE: while (defined($_ = <ARGV>)) { our(@F) = split(/e/, $_, 0); } -e syntax OK
Being perl, there is always a way, no matter how ugly. (And this is one of the ugliest codes I wrote after a while):
use B::Deparse; use Capture::Tiny qw/capture_stdout/; BEGIN { my $f_var; } unless ($f_var) { $stdout = capture_stdout { my $sub = B::Deparse::compile(); &{$sub};
Output:
$ perl -Fe/\\\(\\[\\\<\\{\"e testy.pl m#e/\(\[\<\{"e
Instead, you can skip to the bytecode, as the launch is likely to be the same every time you reach the template.
bolav source share