473,549 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perl Forum

Perl programming language - ask questions about perl programming, syntax, variables, scoping, constructs, operators and functions, files, I/O, regular expressions, regex, subroutines, OO (object oriented), perl modules, CGI and more.
7
9,302
thread by: Frank McCown | last post Jul 19 '05 by: nobull
This has probably been answered a million times, but I can't seem to find the answer. How can I change the owner of a directory using a Perl command? I know chown can be used with files, but it doesn't appear to work with directories. Thanks in advance, Frank
2
9,287
thread by: 123jainmin | last post Aug 30 '06 by: 123jainmin
When I ran a perl script named script.pl which have the the follwing line: system("echo hostname = $HOSTNAME > /tmp/myinfo"); I have another shell script script.ksh which simply call script.pl within the script. the permission on script.ksh is: -rwsr-sr-x WHen I ran script.ksh, I got the error message: Insecure dependency in `` while running...
3
9,284
thread by: pasear | last post Jul 19 '05 by: Kris Wempa
I find I can't run setuid perl script when I do this on a Unix-like platform: 1.Create a file "setuid.pl": #!/usr/bin/perl -T 2.chmod a+x setuid.pl 3.chmod u+s setuid.pl then i try
1
9,239
thread by: Christian Eriksson | last post Jul 19 '05 by: nobull
Hi! I have a problem using the environment variable LD_LIBRARY_PATH in my perl script. Everything works fine when I set it at the command prompt and then runs my perl script like this: presto1@S0222035> echo $LD_LIBRARY_PATH /SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql presto1@S0222035> ldd...
5
9,200
thread by: meili100 | last post Sep 29 '08 by: KevinADC
foreach $key (keys (%hash)){ print "$hash{$key}:"; } The last element will also be followed by a ":" which is not what I want. Is there a way to tell when foreach loops to its last round, so that I can skip printing the last ":"? Thanks!
1
9,199
thread by: funtoosh | last post Jul 19 '05 by: Ben Morrow
Hi Scenario: I have a shell script e.g. a.bash This script wraps a program called "generate" like this: generate > /tmp/y.txt 2>&1 # both stdout and stderr r redirected to y.txt
2
9,163
thread by: bagsmode | last post Jul 19 '05 by: bagsmode
Hi, I'm trying to set a session cookie and then redirect, however I get the error: Status: 302 Moved Location: /index.cgi I thought I recall getting an error like this when I first tried performing a redirect when I had left in print "Content-type:text/html\n\n";
1
9,161
thread by: aurekha | last post Mar 16 '11 by: numberwhun
Hi All, Im newbie to Perl. My problem is that, when i run my script, It is showing the error like "DBI connect('blah','blah',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. at common.pl line 448" Here Im giving dependancies : Orcale Client-10.2.0 Perl -...
8
9,149
thread by: Aaryan123 | last post Nov 17 '07 by: NexisPerl
Hi... I have two questions: 1) I know I can use... # shift() - which removes the first element of an array. if I do this operation twice... I get my desired result.
3
9,130
thread by: jain236 | last post Aug 20 '08 by: KevinADC
Hi , i have file of 32kb , i want to read the whole file into string , i tried this by doing the below code, but i dint got the whole content of the file in the string , i guess the variable is not able to hold the all data, is there any way where i can achive the same? open(FH, "$file"); my @output = <FH>; close FH; foreach $logmsg...
3
9,105
thread by: unlawfulpub | last post Dec 19 '06 by: docsnyder
Sorry guys just wanted to learn. I have a database. When I do the search using mysql suppose i have 100 records I wanted to keep the first second ... in the loop to be retrain. like an integer you may use $count = $count + 1; then in the second round count value would be 2. In this case I wanted the character to retain the old value...
1
9,048
thread by: Schroeder | last post Jul 19 '05 by: Jim Gibson
I am using ActiveState's Perl on Windows and am trying to remove an excess \x0d character I am getting (not sure why I am getting it, but doesn't matter if I can easily be rid of it). What I see in my text is sequences of \x0d\x0d\x0a - and I am trying to replace them with simply CRLF (\x0d\x0a). I admit to being a newbie to Perl, so maybe I...
4
9,038
thread by: Firewalker | last post Jul 19 '05 by: lesley_b_linux
Hey guys, I am newbie to perl. I am trying to deal with dates ( such trying to find what the date would be after month). Is therea function or date class( I am a java programmer, I couldnt find the right word instead of class) to do the job? Thanks for any help.
5
9,029
thread by: Kevin Joseph | last post Jul 19 '05 by: Joe Smith
I have written a Perl script to modify some files over the network. All PCs are Win2k. Most of the files reside on a share in the form of \\server\share_name. Some of the files are on dirves in the form of \\server\d$ and this is where my problem is. My script prompts the user for the file name. It store the information in a variable,...
8
8,998
thread by: raj14 | last post Feb 18 '14 by: RonB
I have a problem. Currently I am trying to compare two text files which has high amount of data. I have developed a perl script to cross check both files. But it takes very long time. The codes are working fine for small number of data. The sample files are attached here. I want the 1st line of chr.txt file to check all the lines in exon.txt....
2
8,983
thread by: Dmitry | last post Jul 19 '05 by: Dale Atkin
Hi folks! I need to find a way to switch to a different Unix user from within the Perl script that is currently ran unattended. Script must switch user in order to execute proper profile for different Data Base Instance and set corresponding environmental variables correctly. Script works fine for a single Data Base Instance. I need to be...
1
8,980
thread by: Marshall Dudley | last post Jul 19 '05 by: Brian McCauley
I have an application where I need to encrypt a bit of text, and then I need to be able to decrypt it using a customer's key. I want to make sure that the key to decrypt is NOT on the server anywhere, so hackers cannot get the decrypt key, which means I cannot use a symetrical key pair since the encryption key will need to be on the server. ...
4
8,951
thread by: Npreeti | last post Sep 24 '07 by: numberwhun
HI , I want to copy a file from one machine to another machine using perl. Also i want to know whether i can past arguments to perl program?
5
8,931
thread by: Anuja T | last post Mar 28 '12 by: numberwhun
I have to compare values of two excel sheets cell by cell. can anybody suggest me how to do it? In advance Thanks.
19
8,926
thread by: SPABBOJU | last post Feb 20 '07 by: docsnyder
Hi guys... I want to check whether string does not exist with out using !~ . basical for character we check like that using . How to do the same for word, sentence ?.... I actually need as a part of one of my project Thank you,
2
8,914
thread by: Matt | last post Jul 19 '05 by: Matt
Hello, I am writing a script that opens needs to get a listing of files in a directory, print that listing to a file and use that file as a quasi ftp control file. My problem is that when I print the filenames found via the readdir I also get the . and .. (current directory and parent directory) written in the ftp control file which causes...
2
8,903
thread by: sainiamit25 | last post Aug 2 '07 by: sainiamit25
Hi All, I have two dates of the following format Wed Jul 11 18:32:46 2007 How can i compare them? I want to use comparison to run another peice of code. Thanks in advance for your help.
3
8,898
thread by: xedsmr | last post Jul 14 '06 by: byadwad
Here is my perl program followed by my output. What am I missing? Thanks so much for any help Write a Perl program that reads a list of strings and then a number (all on separate lines), and then prints one of the lines from the list as selected by the number. Here’s what it should look like when you run this program: % program.pl...
1
8,894
thread by: Kriston Scott | last post Oct 30 '06 by: miller
I would like to know how to sort the rows in an Excel file, using Perl.
3
8,887
thread by: slash | last post Jul 19 '05 by: Aditya
hi, i am new to perl and am trying to convert the code below into a subroutine but have a problem concering the reading of the input. i am trying to pass an array as an argument to the subroutine. the array is produced earlier in the program and needs to be passed to the subroutine. @array holds LINES of words separated by whitespace. so,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.