in reply to backslash found where operator expected at
use strict; use warnings; use Switch; package SES; sub call_ses { my ($paramHash, $optHash) = @_; print "$_ $paramHash->{$_}\n" for keys %$paramHash; return 400, ''; } package main; my %params = (hello => "world"); my %opts; my ($response_code, $response_content) = SES::call_ses \%params, \%opt +s; switch() { case '400' {} }
prints:
hello world
as expected so there is more going on than you are showing. Maybe you should generate the sensible minimum code required to reproduce the issue? See I know what I mean. Why don't you? for some hints.
Note that use of the Switch module is strongly discouraged and has been for a long time. Not the smoking gun in this case, but best practice would avoid using it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: backslash found where operator expected at
by jmc (Initiate) on May 06, 2021 at 20:56 UTC | |
by haj (Vicar) on May 06, 2021 at 21:33 UTC | |
by jmc (Initiate) on May 06, 2021 at 22:05 UTC | |
by AnomalousMonk (Archbishop) on May 06, 2021 at 21:58 UTC | |
by jmc (Initiate) on May 06, 2021 at 22:11 UTC | |
by Anonymous Monk on May 07, 2021 at 15:03 UTC |