Hello,
I'd like to do something but im not quite sure how. I think i might need to use a hash table.
Suppose I have a couple arrays
@array1 = ("apple","orange","grape");
@array2 = ("dogs","cats","birds");
I would like to be able to search for example "apple" and get a key value of "fruit"...
I'm trying to create a here document to automate the sudo command. Anyone have any experience with this? This is what I have but it's not working, it still prompts for password:
!/usr/bin/ksh
sudo - root pkgadd <<HereDoc
password
HereDoc
I found this:
http://empty.sourceforge.net/...
Im issuing the command by PERL script:
net user $id Password1 /add /usercomment:"$phone_num $user_email" /comment:"$user_comment" /passwordchg:no /fullname:"$full_name" /expires:never
This works fine. However, when I look on the active directory(under Administrative Tools), it puts the id...
I just wanted to get some tips as how to get the time stamp, this is on a windows environment but I'm able to execute some unix commands thanks to the MKS kit. Anywho, here is my code tell me what I'm doing wrong! :)
#This script searches the folders in the current
#directory, if it empty it...
Hey guys, I'm getting an error on this CGI script, I can't seem to find it.
here is the html and the script
<form name="form1" method="post" action="reviews.cgi">
<p align="center"><b><font color="#5E00BB" size="6"> </font><font size="6"><span class="style5">Rate -A-...
Hello, I just wanted to know if there was a way to disable the displaying of the transcation when I execute an SMTP session using NET:SMTP module. I tried to turn the debug option to 0, but doesn't really do much, also tried to look for print statement within the .pm but didn't see anything that...
Hello all im trying to split a path with no luck
$str = 'C:\one\two\three';
@ray = split("/\\/",$str);
print"\n Here is the contents of \@ray: @ray[1]\n";
After this executes it doesn't perfrom the join and it's all put in the first value of the array.
Hello I want to parse a text file which will be comma delimited, it will look like this:
FOLDER1,SERVER,TO,xyz@abc.net
FOLDER1,SERVER,CC,xyz@abc.net,bruce@lee.com,bill@hotmail.com
Basically I want to put all this in an array and then be able to run tests because this will interface with an...
I'm trying to use Nmake to install some modules, the problem is when I use "nmake install", it trys to install to a network drive that I don't have permissions to, how can i change it so it will install on my local drive?
Thanks
Hey guys, wanted to know how to concatenate two lists. I looked around and only saw examples using scalaras with the .= operation.
I would like to concatenate for example:
@list_1 = ('my','dog');
@list_2 = ('is','lazy');
@final_list = "insert code here"
print @final_list;
Output: "my dog is...
Hey guys, I'm gonna be writing emails from SMTP virtual server running off of IIS. Currently I'm using Net::SMTP module to write emails but im gonna have to start writing CC: 's. I dont think Net::Smtp supports it, I looked through the code in Net::Smtp and i see some references to it, but not...
just trying to test if there is an "@" in a string but it doesn't seem to be working because no matter what i put the ouput in the if gets displayed.
print "Please enter the sender address: \n";
$mailaddy = <STDIN>;
chomp($mailaddy);
if ($maildaddy !~ /\@/){
print "The e-mail address...
Hey guys i have this subrouting to parse a comma delimited file. I'm just confused on the pattern, could someone explain this part?
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
| ([^,]+),?
| ,
}gx;
sub parse_csv {
my $text = shift; # record containing comma-separated...
When this code executes, i end up with a text file that is about 500megs and keeps growing, mind you the only thing in the input file is a single sentence.
Any ideas?
open (INFILE, "<merge1.txt") ||
die ("Cannot open the file 1\n");
open (OUTFILE, ">outfile.txt") ||
die ("Cannot open the...
This is the error i get:
Undefined subroutine &main::OUTFILE called at C:\PerlStuff\prog1.pl line 180, <INFILE2> line 1.
Any ideas?
open (INFILE1, "merge1.txt") ||
die ("Cannot open input file merge1\n");
open (INFILE2, "merge2.txt") ||
die ("Cannot open input file...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.