Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
Why the same script have different behavior when executed in Normalor Debug mode?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="djslls, post: 4863384"] I'm a beginner in perl. I met a problem today. I don't know why. Here is the scenario: Test on Windows XP, Perl v5.8.6, Locale: English #!/usr/bin/perl use strict; use warnings; use Encode; use Text::ParseWords qw(parse_line); my $teststr="123#abc#xyz"; $teststr=decode("ascii",$teststr); ###(1) pay attention here my @testarray=parse_line("#",0,$teststr); my $test=$testarray[0]; print $test; in Normal executing mode, I get "123" in output; however, when debugging, I type "p $test" just before the last line, I get nothing. It should be "123". What happens here? Is there anybody know something about it? Thanks in advance! ps. if we comment the decode line, the script will work well in both mode. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
Why the same script have different behavior when executed in Normalor Debug mode?
Top