Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi while running a perl snippet getting error as : "Can't modify subtraction (-) in scalar assignment at /usr/local/intranet.tsp line 329, at EOF"

#please let me know what mistake i'm doing here.Thanks


PERL
my %vhost_dev-redirector = (
        name             => 'dev-redirector.com',
        alias            => 'network.hostname.1',
        docroot          => '/www/unauth/dev-redirector',
        ServerAdmin      => 'infeng@e.com',
        directives_vhost => [
                                '<directory www="" unauth="" dev-redirector="">',
                                'Options FollowSymLinks ExecCGI IncludesNoExec',
                                ''
                            ] #LINE 329
    );
    add_recipe('vhost-generic', \%vhost);


What I have tried:

Tried and used FAT COMMA to resolved but no use. still getting error.

I suspect '<directory www="" unauth="" dev-redirector="">', is the line having problem.

please help me out
Posted
Updated 9-Dec-19 4:16am
v2
Comments
k5054 9-Dec-19 10:19am    
Maybe try replacing the hyphen with the hex code (%02d), eg dev%02dredirector=.

1 solution

Change the variable name dev-redirector to dev_redirector, using underscore instead of subtraction operator.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900