Programming :: Perl: Determine Error Origin / Meaning In Code Call

Jan 20, 2010

I've been requested to modify a perl backup script we use which mounts a networked NAS machine. The actual mount command is called inside a system() command. In testing, I can do a test of the return value, so I'm able to tell whether or not I've mounted properly, but I can't make heads or tails out of the return on deliberate errors. (Such as mounting a non-existent box.) I'm displaying the returned value, which is 256 in my tests. The man page for mount listed error messages with values from 1 to 64, but no higher. Am I drawing this error value from the system command somehow? And what would be the best way to determine what this error means?

View 6 Replies


ADVERTISEMENT

Programming :: 32512 Error Code In Perl When Trying To Run Shell Command?

Nov 29, 2010

when I execute the command from the shell command line - it works and no error code.if I do the exact same command from a perl file - it fails with code 32512.the file is created from the same perl script that runs the command that fails. file permission is 0664.

Code:
#! /usr/local/pkg/perl-5.8.8/bin/perl
print "Content-type: text/html

[code]...

View 3 Replies View Related

Programming :: Call Shell Script In Perl Pm

Sep 4, 2010

i used ldap for authentication.now i have a perl script that users use it for login(contact.pl),then this script calls a shell script(ip.sh) for create iptables chain.

when i call that into contact.pl ,it just prints: usr/sbin/iptables but ip chains didn't change.what is problem? whenever run ip.sh in bash it works correctly

View 10 Replies View Related

Programming :: Perl Code Tools

Jun 3, 2010

I want to write some script to do a job which is post some data to the website every one hours .I find some information say the Perl can do this job .I know I can write by the vim.but is these any tools can help for coding .may be it will prompt the class .what tools you use ?

View 10 Replies View Related

Programming :: Simple Perl Log Code Not Working?

May 25, 2010

I just upgraded servers, and I'm now on 'perl v5.8.8 built for i386-linux-thread-multi' and a simple log script doesn't work. I got it changed to

Code:
#!/usr/bin/perl
use strict;

[code]....

View 4 Replies View Related

Programming :: Call Socket Prog Code Written In User Space From Kernel Space?

Jul 14, 2009

How to use execv from kernel space to call a user space program writtenfor socket prog.

I tried to write code for socket in kernel but its not working.

Socket code in kernel is also needed.

View 2 Replies View Related

Programming :: C - System Call & Error Checking?

Sep 18, 2010

I am trying to figure out how i would go about finding out where system call is made and error checking is not done. I have code below, if somebody can point me in the right direction where system call is made but error checking is not done.Quote:

#include "shell.h"
#include <stdio.h>
#include <string.h>

[code]....

View 5 Replies View Related

Programming :: PHP Fatal Error - Call To Undefined Function Mysql_connect()

Nov 5, 2010

Am getting errors about "mysql_connect()" for the following code:

Have compiled PHP with MySQL support using the following:

Thought PHP 5.3 has a built-in replacement called mysqlnd, and there's no need to install "php-mysql" RPM.

However, according to the following site this is still required: [url]

Give me an idea whether I really have to install php-mysql RPM in order to use mysql_connect() for PHP?

View 4 Replies View Related

Programming :: Die 'error' If (xxx) - Valid Perl?

Mar 2, 2010

I saw a wierd code in perl code recently it went kind of like this: die 'error' if (xxx); Now is that valid perl?

View 5 Replies View Related

Programming :: Parse Error: Syntax Error, Unexpected '@' In Php Code

Jun 14, 2011

Parse error: syntax error, unexpected '@' in C:xampphtdocsminippromail.php on line 8 .......its not recognizing the '@' symbol. heres the code im working with

<?php $receiver = myfriend@ourmail.co.in; $subject = wish; $content = Hi! My dear friend how are you.; $sender = myself@ ourmail.co.in ; $headers = From: $sender; mail($receiver,$subject, $content,$headers); echo Mail has been sent successfully.; ?>

View 1 Replies View Related

Programming :: Perl Script Wont Run - No Error

Aug 8, 2010

I've been trying to get the ol' hello world script to run in a browser. From the hours of reading of various pages about this, I cant work out Basically I get nothing at all displayed.

the perl (test.pl):
#!/usr/bin/perl
print "Content-type: text/html
";
print "Hello, world!";

[Code]....

The output: Nothing. no error message either in the browser window or in the servers error log. If I change the path or the file name I get "invalid CGI ref" in the Cpanel error log.

I did get this to work for a brief time, then changed the Perl script and it stopped working. So I went back to hello world and havn't seen it work since. What is going on?

View 1 Replies View Related

Programming :: Perl Net- LDAP - Why Don't Work Any Error Handling

Nov 12, 2010

i have some perl codes for using ldap,but i don't know why don't work any error handling When i use msg->code for sample. an example:

[Code],,,,

In this case,if $msg->code return zero(or null) every thing work correctly but if it not zero don't give any message(eg."error result").What is problem?

View 1 Replies View Related

Software :: Determine When Source Code For My OS Present On PC?

Feb 4, 2011

I recently purchased a PC with linux ubuntu installed. Is there any way to determine if the source code for my OS is present on the PC?

View 9 Replies View Related

General :: Call Other Executables From Cpp Code?

Jan 18, 2010

I want to launch other executable from my cpp code. I am aware that system() call may do this , But, problem is that , I want my cpp code to capture the standard hat "called" program is writing to stdout.

View 2 Replies View Related

Programming :: Error/warning Message S From For Simple Perl Script

Mar 17, 2010

I just wrote a simple perl script to compare the following two files

[Code]...

View 7 Replies View Related

Programming :: Error In Graphics - Run Code

Jan 2, 2011

i want to run this code

[code]...

i have error in graphics. i have C++ 2005

View 4 Replies View Related

Programming :: Parse Error In Php Code?

Jan 20, 2011

I am novice. I am trying to create one email form. But i am getting "Parse error: parse error in F:estwampwwwsendmail.php on line 43"

Code:
<?php
if(isset($_POST['email'])) {

[code]....

View 3 Replies View Related

Programming :: Converting C Code To C++ Causes An Type Error?

Mar 25, 2010

I'm a C / assembler programmer so am not use to C++, which I need to use. Basically I'm using my own versions of memcpy, but for long and int rather than char. It's for fast graphics. So I have a char array which I copy to another array. But I copy as either longs or ints, much faster. for example

Code:
void * fastmemcpysprite (void *destaddr, void const *srcaddr, size_t len)
{

[code]...

View 3 Replies View Related

Programming :: Get Error Code From Child Process?

Mar 28, 2011

I'm writing a sort of toy shell using fork() and execv(). It runs smoothly enough untill the user enters an invalid command at which point the program hangs, so I need a way to check if the program loaded using execv returned correclty or not in the parent process and kill it if it didntI tried writing stderr to a text file to see if something whent wrong but doesnt really work out. Try running ./digenv GDM -i -Q for instance. (-Q is an invalid option for grep which the program runs at a certain point).Heres the code:

Code:
//digenv
//Carl Reg�rdh 2011-03-24

[code]....

View 13 Replies View Related

Programming :: FORTRAN77 Code Not Working - Showing No Error

May 17, 2010

I have written FORTRAN77 code,also a makefile. But is not working at all. how to start looking for errors?

View 9 Replies View Related

Programming :: Error Messages Generated When Compiling C++ Code?

Jul 3, 2010

Is there an online resource to lookup error messages generated when compiling C++ code?

View 5 Replies View Related

Programming :: Compilling C++ Source Code (class) Error?

Feb 24, 2011

please i try to compile the below code on ubuntu with g++ but i was getting an error message

fig03_05.cpp:10: error: new types may not be defined in a return type
fig03_05.cpp:10: note: (perhaps a semicolon is missing after the definition of �GradeBook�)
fig03_05.cpp:32: error: two or more data types in declaration of �main�

[code]...

View 7 Replies View Related

Programming :: Meaning Of Compiling A Program?

Aug 17, 2010

I have been using gcc to compile C programs.
I want to know what exactly is the meaning of Compiling a C program.
I checked
cc -S prog.c
will give an .S file and if you analyze the hexdump I saw some assembly instructions.
So what does the compiler do which is not required in case of interpreted languages?

View 13 Replies View Related

Programming :: Meaning Of Underline That Before Parentheses?

Jun 22, 2010

I see the function in tint2 source code, but I don't know the underline before a parentheses's meaning? _("Theming tool for tint2 panel") code...

View 1 Replies View Related

Programming :: Error 4 Which (according To /usr/include/asm-generic/errno-base.h) Means "interrupted System Call"

Aug 1, 2010

I'm using gmake (v3.81) to build some c executables. As the first step in the process I run the files through a preprocessor (for embedded SQL). The preprocessor completes successfully, but the gmake reports an error and discontinues buiding the remaining dependencies...

make *** [myfile.c] Error 4

which (according to /usr/include/asm-generic/errno-base.h) means "interrupted System Call". My preprocessor doesn't raise any signals, so I'm not sure what's causing this error.

View 2 Replies View Related

Networking :: Finding A Network Simulator Code In C++ And Perl Not Using Tcl Or Otcl?

Apr 19, 2011

I need to refer a sample code to develop a network simulator using c++/system c as back end and perl scripting asd front end.CAn anyone please refer to me any websites were this kind code is given.I do not want to use this otcl script language so wothout this is any code available just for sample so i wii know were to start and develop my own code.

View 3 Replies View Related

Programming :: Perl Compilation Error "Cannot Locate Unicode/String.pm In @INC"

Mar 9, 2010

I get an error when typing perl build.pl: Code: Cannot locate Unicode/String.pm in @INC

View 11 Replies View Related

Programming :: Perl - Directories Given To Opendir Via Foreach Give "No Such File Or Directory" Error

Feb 19, 2009

I'm writing a perl script to remove a test database and part of that is of course getting rid of all files. So I wrote this to do the job:

Code:

This always results in an "Could not open /u00/app/oracle/product/10.2.0/rdbms/dbs for reading: No such file or directory" (that directory is the one ending with the $spfile_dir variable) message, although that directory exists and the executing user has writing rights on it.

The same behaviour if I create the directory array like this:

Code:

The problem does not occur when one of the directories is the only element in the array though. Of course I could copy and paste that part of the script for the second directory, but I don't like that workaround.

View 1 Replies View Related

Programming :: Selenium Java Code Into Equivalent Php Code?

Mar 30, 2011

I need to rewrite the selenium java code into its equivalent php code.

View 5 Replies View Related

Fedora Networking :: /usr/bin/perl: Symbol Lookup Error: /usr/bin/perl: Undefined Symbol: PL_use_safe_putenv

Apr 8, 2009

I am trying to setup the wlan access for my Fedora 9 system. I installed ndiswrapper. But when I run

Code:

ndiswrapper -l

i am getting the error

Code:

/usr/bin/perl: symbol lookup error: /usr/bin/perl: undefined symbol: PL_use_safe_putenv

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved