Hi gurus, during debugging script I noticed some very strange behavior. The 1st task is to trim last character of string stored in $temp1 variable, this can be done using either chop($temp1) or more complicated substr($temp1, 0, length($temp1) - 1). Those both codes works as oneliners but in my script the substr solution did not works. Bellow is example from debugger:
1st TASK:
=========
1st SOLUTION - DID NOT WORKING:
===============================
As you can see in the $strprn variable nothing is stored but if the same piece of code (which is stored into $strprn variable) is printed via 'p' command the output is OK. This "bug" can be overcomed using mentioned chop() function, see code bellow:
2nd SOLUTION - WORKING:
=======================
The above code is exactly the same as first example but following two lines from 1st example:
are replaced with following two lines in 2nd example:
What is wrong with 2nd solution ?
2nd TASK:
=========
Second task is quiet simple matching the string against regexp, but it is not working for me:
This is problem which I did not workaroud so far.
As you can see after executing line 21 in code the next execution line is 43 (the else statement). Why following condition is not evaluated as a true and code did not continues with line 23, 24, 25 ...
Following line was inserted as a demonstration that condition should be evaluated as a true.
Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect.
Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is
redirected to welcome page.
My... (3 Replies)
I hope this is the right thread - not sure if it belongs in the Linux forum. Anyway, I'm having an issue with ddd and gdb. When using ddd to run gdb, there are extra parameters being appended, and my program is picking them up.
I'm running on Ubuntu 11.04...
Here's my command line entry -
... (1 Reply)
GNU insight debugger is not available now a days and it is required to debug/inspect
assembly code as written in the book Assembly Language Programming step by step in Linux so my question is; is there any alternative to insight that I can use instead of insight in which I can get the same... (5 Replies)
If this is the wrong forum, move it. It seemed like the best.
Does anyone know of a perl thing that does the same thing as bash -x except for perl? I know I can output the information I want at the right times by actually putting that in the code, but it's harder... (2 Replies)
I have tried lots of stuff but i can't get it working, i have also found a Thread in this Forum about it but it didn't describe how the program has to be run ect.
My issue is that i want to run a program with multiple arguments eg.
./myprog arg1 arg2 arg3 arg4 arg5
with dbx, but i cant get... (8 Replies)
I'm a C newbie using gcc. I wrote a program but a part of it outputs gibberish onto the terminal. Its weird because identical parts of the program work correctly in another program I wrote :confused:. My program uses c99 + some POSIX headers. It compiles with no errors/warnings even though I have... (15 Replies)
Hi,
can somebody advise on a better multiprocess debugger?
I heard with gdb we face lots of problems in multiprocess scenario
currently i am using gdb debugger for a single process multithreaded project..
since i am supposed to work on a multiprocess now, i googled and came across... (1 Reply)
hi,
I want to have a debugger for my kernel and
I am using kernel-2.6.11 n i am having patches
kdb-v4.4-2.6.11-common-1.bz2
kdb-v4.4-2.6.11-i386-1.bz2.
I applied both.
I did make menuconfig with options
CONFIG_KDB n CONFIG_FRAME_POINTER being set.
when i tried to compile kernel. I got an... (0 Replies)
Hi all,
is it possible to skip a function with the wdb debugger ?
could be helpful instead of compiling the whole bunch again
does someone know how to do this ?
thx
Sven (4 Replies)