Perl: How to load some functions automaticaly, starting Perl inteructively (with -d -e 0)?
I would like to use Perl in 'interactive' mode (kind off), starting it by
> perl -d -e 0;
But I need to have some function be read on loading.
Also, it should not be for anyone who starting Perl or use it any how.
I did try to search, but not much result.
I have try a file '.perldb': seems, perl did try to read that (complained on permission mode), but no defined functions available after that.
By now I only able to load functions by (having all them in .perldb)
command, but it is uncomfortable, starting from different locations...,
and I would like to have the file to be load automaticaly when I starting the perl in debug mode.
(No any reply on pretty simple question: not many Perl developers?)
Finally, I am using such way:
- file named as a Perl module: with 'pm' in extension.
- Starting Perl in 'interactive' mode I use -M<module_name> and -I<dir_name>
- if I need it in some Perl-script that stared with sheband #!/usr/bin/perl I have on that line additionaly -I<dir_name> and one of starting line:
USE <module_name>
So, the <module_name> is the file name without the .pm extension, and
-I<dir_name> is including to @INC array the directory of the file, allowing the Perl to search for the module (under USE) in that directory.
And, finaly, to avoid typing for starting Perl interactively, I use alias with those -I<dir> and -M<mdl>
My issue is that the perl script (as I have done it so far) created empty branches when I try to check some branches on existence.
I am using multydimentional hashes: found it as the best way for information that I need to handle. Saing multidimentional I means hash of hashes ... So, I have
... (2 Replies)
I am somewhat new to Perl. I have Googled Perl one liners and worked with the MIME::Lite library to send emails with attachments. But I have not done any real Perl scripting. I need to write a script to install code for our application using an Oracle database with DBI, and to track in the... (4 Replies)
I have written a perl scripts which loads the data.
Now i want to modify the script, to Archive the Input file after the successful load of data.
Can anyone please share it and help me ....
Thanks. (2 Replies)
Hello all,
I know this is Unix forum, but i also know that there are some experts here who can help me out with this situation;
I am loading a data file into oracle table using Perl script by calling sqlldr script.
It does not do anything, and no data is getting loaded.
Any help,... (2 Replies)
Hi to everybody.
I have a script in AWK with a revursive function, when I make the recursive call I'm loosing values in the local variables. So I'm trying to do the script in Perl, but I don't know Perl.
I want to load several hashes with the data in a pipe separated file. In AWK it looks... (0 Replies)
Hello,
I need to write a perl script to find where functions is called in c files..
The script should scan the file and find out the function names and then search to see where they are called...
Lets for now assume all functions are internal.
I don't know where to start :(
... (4 Replies)
I write this code.
It show the first dialog correctly.
but, no matter i modify the code(load module by use or require, or something i think maybe error)
it can't pop-up anymore.
and show this warning.
Thanks.
(I'm sorry for my English.)
Tue Mar 16 17:24:36 2010
... (0 Replies)
hi there
I have the following script in which i have created a PrintHash() function.
I want to pass to this function the reference to a hash (in the final code i will be passing different hashes to this print function hence the need for a function). I am getting an error
Type of arg 1 to... (1 Reply)
Hello, maybe this post is offtopic, sorry for the inconveniencies (maybe should be in the forum with questions about C, C++, Java, SQL...).
I found examples about how to populate different fields from a text file (with MySQL, the LOAD DATA INFILE sentece), but not about how to load a complete... (2 Replies)
Hi,
First I will tell my objective of this function (function one).
I have a table for ex:
id passwd name
-- ------ -----
1 fdhgfs werwer
2 fsdfs sdfsdf
3 sdfs sdfsdf
4 fdsfs dssdf
. . .
.
.
.
The id, passwd and name are the arguments for another function say two. (1 Reply)