473,543 Members | 1,996 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.
21
4,398
thread by: ajd335 | last post Jul 17 '08 by: ajd335
hey all, I want to remove the below line from the resulting text... (.*)$/',$lines,$matches))10.(.*)$/',$lines,$matches))(.*)$/',$lines,$matches)) i used perl -pi -e 's/\(.*\)\$/',\$lines,\$matches\)\)10.\(.*\)\$/',\$lines,\$matches\)\)\(.*\)\$/',\$lines,\$matches\)\) / /gi' result.txt > result1.txt
1
1,097
thread by: kriz4321 | last post Jul 17 '08 by: numberwhun
Hi I have a file with sample test as follows abc04,10.20.30.30 abc05,10.30.40.50 abc06,10.40.50.50.50 In my perl script if it searchs for abc04(can be hardcoded) it should give the address(10.20.30.30) corresponding to it and store it in a variable. I will be able to do this with a normal perl program(using while loop) but I nned to...
2
1,337
thread by: lilly07 | last post Jul 17 '08 by: numberwhun
I managed to find thelist of files in a directory as below: grep {/\.txt$/i} How do I use grep statement to list directories of statting name as test... Thanks and Regards
3
2,946
thread by: lilly07 | last post Jul 17 '08 by: lilly07
Suppose I have a set of directories as lane1, lane2, lane3, file1, file2..under /home/userrig/test in a linux server. And the last updated directory is lane3. lane1, lane2 and lane3 are directories and file1 and file2.. are under files under /home/userrig/test. I am only interested in directory that starts with lane How do I collect...
5
3,308
thread by: zcabeli | last post Jul 17 '08 by: nithinpes
Hello, i'm looking for the equivalent perl symbol that match #define in C/C++ anybody have an idea if any such feature exists ... thanks,
3
3,906
thread by: you | last post Jul 17 '08 by: you
Hi there, File manupulation is difficult in Perl. I'd like to modify a file with JSON format. For example, test.conf is: { "tests" : , ... (and so on) }
12
1,509
thread by: ramesh54 | last post Jul 16 '08 by: KevinADC
Hello All, I have a test file z.txt with following lines *transformation X Y Z 10 20 30 Finally i need to have a the same text files as follows,
2
1,355
thread by: Geoff Cox | last post Jul 16 '08 by: Geoff Cox
hello Say I am interested in users giving me values for a, b, c and d. I have a file with all the results - a very big file! user 1 a: one b: two d: four
5
1,261
thread by: lilly07 | last post Jul 16 '08 by: lilly07
Hi I have one row of data from a database as @data. I need to sort the items available in $data, 2,3,4,5,6,7,8 positions For example if the data are as below: man, women, man, man, women, man, man, man in their respective position. Then I want my output to be as below: 134678: man 25: woman
2
1,321
thread by: Manish Roy | last post Jul 16 '08 by: numberwhun
Hi, I am trying to discover Devices in network . i have a Rang of IPs. I need to know what are the possible steps to Discover Devices with this IPs I am using Perl Script. Most of the Devices has SNMP Enabled. I have UserName and password. I need to find in Device: SNMP
1
1,120
thread by: karthikeyanck | last post Jul 16 '08 by: numberwhun
I 've got this script here and struggling to apply threads to the "ping" part of the program, Any help much appreciated. use Net::Ping; use Getopt::Std; sub usage { print "pingscan -f <Input file> -o <Output file>"; exit 0; }
9
5,112
thread by: systemsvenkat | last post Jul 16 '08 by: numberwhun
Hi Could help me to provide a script to find a *.log files on file name W3* and need to delete them which are older than 4 days. (script should search entire c drive in windows with hidden files) please mail me the script to <REMOVED BY MOD> Thanks
1
1,527
thread by: Geoff Cox | last post Jul 16 '08 by: Joe Smith
Hello I have a file called fs-test.txt which has in it 7/7/2008 9/7/2008 and a pl file use warnings;
1
1,920
thread by: Zygor1 | last post Jul 16 '08 by: numberwhun
Without going into details; I have the need to pass a string containing double backslashes \\ from the DOS command line and convert these to single backslashes in the code. The problem is if I do this from within perl code directly it is no problem but when I attempt to pass a string from the command line, it seems to lose something in the...
3
1,488
thread by: ejaggers | last post Jul 15 '08 by: KevinADC
I'm teaching myself OOP by following examples. I can't figure out what this is doing for the life of me. I've read the explanation and still don't get it. Can anyone explain, plus is there a more obvious way to do this: MY CONFUSION IS THIS STEP: push (@{$year_index {$year}}, $rlEntry); # By Year BOOK'S EXPLANATION: Since we...
2
1,577
thread by: cnsabar | last post Jul 15 '08 by: cnsabar
Hi All, Is there any way to call user defined perl package from other system. For Example. In my perl script, I am defining a package/modules using use myPackage;
2
1,142
thread by: maestomani | last post Jul 15 '08 by: maestomani
Hi There, I'm new to scripts. I want to learn perl to automate my work. Please let me know from where should i start from, how to start... I works in unix platform... BRs
3
5,243
thread by: Supra | last post Jul 15 '08 by: Supra
Hi, I'm using the following code to send an email from a form on a PHP page. If there're unicode characters in message body, they get carried over fine in the email sent out, however if there are some in the subject or name fields, they come out as blanks in the email received. Does anyone know how this can be fixed? #!/usr/bin/perl
3
4,469
thread by: numlock00 | last post Jul 15 '08 by: numlock00
I have a nested 'while' loop that won't repeat, no matter how many times the outer loop repeats. The outer loop reads through an array of elements; the inner loop Ithe 'while' loop) is supposed to apply each of these elements while reading an input file. The outer loop is working fine. It will run through every element of the array. The inner...
0
1,244
thread by: Dave U. Random | last post Jul 14 '08 by: Dave U. Random
http://easyurl.net/PERL5
4
1,274
thread by: ajd335 | last post Jul 14 '08 by: ajd335
Hey all, I have one folder in our shared document drive . In that folder , there are text files(Included time stamps) like systems_14475383.txt and systems_15354781etc That all file contains IP address . Now how can I wirte a perl script to have IP address from each of them ?? Any Idea? Thanks,
6
1,440
thread by: Raju Sathliya | last post Jul 14 '08 by: Raju Sathliya
I have writen a small script to replace the . with /../ which is as follows. $var = "DataAccess\DataAccess."; $var =~ s/(.)/(\)..(\)/; print "value is : $var"; But in this case when I run this script it gives me result as : value is : ()..()ataAccessDataAccess.
3
1,812
thread by: zcabeli | last post Jul 14 '08 by: zcabeli
Hi my $x = "1-6"; if ($x =~ /^\s*(+)\-(+)$\s*$/) { print "SUCCEED \n"; } else { print "FAILED \n"; }
3
1,230
thread by: Jordie64 | last post Jul 14 '08 by: KevinADC
Hi, I am trying to create a newsletter subscription form on my site and then save it to a csv file. I would appreciate any tutorials on this subject. Thanks
5
2,034
thread by: zcabeli | last post Jul 14 '08 by: KevinADC
Hello, how can i find the index of an existing element in a list ? thanks,

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.