Perl-5.000 lexer too strict in 'here' documents? 
Author Message
 Perl-5.000 lexer too strict in 'here' documents?

The following code fails in perl-5.000 with a "literal now requires
backslash" error unless you declare the arrays first (as done here) or
use a printf instead of a print <<EOF construct.  Not a problem in
this case, but it really defeats some of the usefulness of symbolic
references...

Travis

#!/usr/local/bin/perl --                # -*- Perl -*-


# key is regular expression, value is 'varname . $; . field'
%reglist = (
            '^\s+Principal:', "user$;2",
            '^\s+Group:', "group$;2",
            '^\s+Cell:', "realm$;2",
            '^Identity Info Expires:', "expiration$;3",
            '^\s+[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}'
            ,"groups$;1"
            );





    foreach $key ( keys(%reglist) ) {
        if ( /$key/ ) {
            ($var, $range) = split(/$;/, $reglist{$key}); # split value

        }
    }

Quote:
}

$" = "\n\t\t";

print <<EOF






EOF



Mon, 28 Apr 1997 21:40:23 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. PERL5.000 on Solaris2.3 'timesbuf'??

2. Memory leak using perl 5.000's split() and a decrement

3. Perl5.000 for AT&T System 3000's available

4. Numbers to strings with preceeding 000's

5. Tk402.000 - can't compile :-(

6. Can't finish compiling Tk402.000 - help!

7. Error with 'use diagnostics' with 'require 5.000'

8. use strict sure isn't very strict

9. Using File::Find with 'use strict'

10. 'Document contains no data'...still having problems

11. 'Document contains no data' in browser

12. strict, global vars and 'require'

 

 
Powered by phpBB® Forum Software