From f0b2cf552638278613953870ec9b5623f83b321d Mon Sep 17 00:00:00 2001 From: Yitzchak Scott-Thoennes Date: Tue, 3 Jun 2003 17:08:32 -0700 Subject: Re: SPUG:-s option doesn't always work! Message-ID: p4raw-id: //depot/perl@19695 --- toke.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'toke.c') diff --git a/toke.c b/toke.c index 4d694cdfcb..d57dc0cef9 100644 --- a/toke.c +++ b/toke.c @@ -2727,6 +2727,14 @@ Perl_yylex(pTHX) } d = moreswitches(d); } while (d); + if (PL_doswitches && !switches_done) { + int argc = PL_origargc; + char **argv = PL_origargv; + do { + argc--,argv++; + } while (argc && argv[0][0] == '-' && argv[0][1]); + init_argv_symbols(argc,argv); + } if ((PERLDB_LINE && !oldpdb) || ((PL_minus_n || PL_minus_p) && !(oldn || oldp))) /* if we have already added "LINE: while (<>) {", -- cgit v1.2.1