473,549 Members | 3,017 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.
1
2,397
thread by: Madhu82 | last post Feb 16 '12 by: Ramkumar85
So Far, I am using below code, with which I am not able to get latest file by latest time stamp or by modified time. use warnings; use strict; my $RepoPath = "C:\\input";
0
1,335
thread by: khanzadayz | last post Feb 14 '12 by: khanzadayz
Please tell me how do you do bitwise comparison of files from two directories. My current thinking is as: #!/usr/bin/perl -w $CMP="/usr/bin/cmp"; $dir0=$ARGV; $dir1=$ARGV;
3
2,976
thread by: thesunlover | last post Feb 9 '12 by: thesunlover
Hello, I've compiled Perl and OpenSSL from sources under Solaris 10 as requested, but loading SSL module is still failed with error 'ld.so.1: perl: fatal: relocation error'. Got this one but don't understand well - http://perldoc.perl.org/perlsolaris.html#MAKE-PROBLEMS. Please help (desperately)! Here are the full errors:
0
1,468
thread by: dillipkumar | last post Feb 9 '12 by: dillipkumar
Hi All, My aim is to redirect the XML Response into another file. But i am not able to redirect the XML response into response.xml file. I have written below script. use Data::Dumper; $Data::Dumper::Terse = 1;
0
1,147
thread by: Ramkumar85 | last post Feb 7 '12 by: Ramkumar85
Hi Friedns, I need to scrape the data from "https://portal.emsa.europa.eu/web/thetis/refusal-of-access". I checked this url with help of "LWP::UserAgent" and "WWW:Mechanize" module but i didn't get the result. Kindly provide me any solution for this. Regards, Ram.
1
3,129
thread by: Ramkumar85 | last post Feb 5 '12 by: chorny
Hi All, I need to scrape the data from the URL "https://hms.portxcs.nl/oper/Public/PublicMovements.aspx". Here we give the dropdown box for "Time" should be "Next 7 Days" and "Port" should be "Vlissingen" Finally click the "Search" button. Web page shows some records about the given credentials. I want to scrape that datas. I used the...
6
1,900
thread by: pallabtrue | last post Feb 3 '12 by: pallabtrue
Hi I have two files. One file contains all my interested uniprot id and second file contains uniprot ID with their corresponding family. My aim or I am trying to create new file. So from file1, I want compare all Id with file2's Id. If equal then they should print id with their family name or not equal then they should print their id with...
1
1,692
thread by: Prasanna CRN | last post Feb 3 '12 by: Prasanna CRN
Hi Friends, I am trying to write a script to split file with the size as an argument. Based on the size, i am trying to read for Input File & Dump it to output File. But, read() returns the number of bytes actually being read (for ex : file split size as 200 bytes), while printing, output file size is greater(213 bytes) than actual...
3
2,276
thread by: perlrmhu | last post Feb 3 '12 by: chorny
I need to read a file on Unix server that has only one line with a character on it. My script needs to read in the character. If the character is 1, the script stops and exit. Otherwise, the script runs. Befoere the scripts ends, write the "0" to replace "1". I wrote some code like below. but it does not work and get error of "Reference to...
2
1,478
thread by: OmbongiMoraa | last post Feb 1 '12 by: chorny
Hi, I'm learing perl and I've just come up with the following statement from a some script: $content = $dbh->quote($content); I've read through Blair Ireland's tutorial on perl MySQL functions for the meaning of this quote string function but I'm still not getting it. Would someone please explain to me in simple language, exactly...
1
1,366
thread by: OmbongiMoraa | last post Feb 1 '12 by: chorny
Hi, My company is starting a new subscription service and I'm in charge of the data collection. Trouble is, since these will be SMS messages, the have to be within the limit of 160 characters. So, I can do it manually(get the message and run it through our company's web based SMS management system character-number checker) which is handy...
1
2,616
thread by: Aarthi Krish | last post Jan 31 '12 by: RonB
Hi, I need to transfer files from Linux to windows system, without reading the content, directly to push to the destination. I am new to perl.Kindly advice me.
2
1,480
thread by: starlight849 | last post Jan 30 '12 by: sathishkumar88
I'm using the printf function to display some textual information. It is possible that the string may contain different symbols such as $#%^&* somewhere within the text. I know that to handle the % that I need to use a %% to make the string evaluate correctly. for example: printf "strin%%g"; will display as strin%g My question is...
1
1,830
thread by: Dinesh Babu | last post Jan 27 '12 by: Dinesh Babu
Hi, I tried to run a simple perl script in windows and linux. sub ispallindrome($); print ("enter a string"); chomp (my $string = <STDIN>);
1
2,206
thread by: starlight849 | last post Jan 25 '12 by: C CSR
I have a very simple question. If I am calling a subroutine and passing in StringA by value.. Then I declare a new variable in the subroutine ( we can call it StringB) and want to return StringB back. How will StringB return? Will it be byval or byref? Does perl have a default way of assigning this?
3
1,618
thread by: perlboy | last post Jan 24 '12 by: sathishkumar88
gi|282558029|gene000415 lga:LGAS_0495 1e-87 100.... gi|282558029|gene000415 lga:LGAS_0495 1e-87 189... gi|282558029|gene000415 lmo:lmo0426 5e-06 29.... How to compare lines for similar starting string. I want only first line out of many such lines with similar starting string. How to do that?
1
1,727
thread by: mohan123 | last post Jan 19 '12 by: RonB
I am new to perl but after spending late nights for some days , i was able to generate code for database backup. the code will ask you enter servername , enter database name if i enter it will take backup suppose my code is in backup.pl now the thing is i need to get database backup by entering like this perl backup.pl -i servername -d...
1
1,402
thread by: linly | last post Jan 17 '12 by: RonB
Using the Simple perl database in Bytes, I have defined my database as follows: %fields = ( ID => , UserName => , Password => , Level => , FullName => , Email => , Location => ,
1
2,158
thread by: starlight849 | last post Jan 16 '12 by: RonB
This has been solved I am passing a variable that needs to be evaluated with a print command. An example of my variable may look like this "variabl%e" I understand that the best way to get around the percent problem would be to simply add another percent sign to the variable and then it would evaulate out to one percent. Is there an...
0
1,305
thread by: gugan | last post Jan 7 '12 by: gugan
Hi,I want close the tags in hierarchical way. (E.g)This is my input. <P_Normal><list-bull></P_Normal> <P_list-bull(1)>Use Microsoft Windows accessibility </P_list-bull(1)> <P_list-simple(2)> Magnify the display </P_list-simple(2)> <P_list-simple(2)> Change the size of text and icons </P_list-simple(2)> <P_list-bull(1)>Adjust background...
4
2,354
thread by: perlybuddy | last post Jan 6 '12 by: numberwhun
Hello. I have a file named "test.fasta" which contains three patterns and looks like >1elwA AAAAAASSSSSSSSSSSSSSDDDDDDDDDDDFFFFFFFFFF >1flwA GGGGGGGGGGHHHHHHHHHHHHIIIIIIIIIIIIIIJJJJJJJJJJ >1ghwA KKKKKKKKKKLLLLLLLLLLMMMMMMMMMMNNNNNNNNNNOOOOO
1
1,623
thread by: chintan85 | last post Jan 5 '12 by: numberwhun
Hi Guys, I have some rows in excel in which one of the cell is green in color while rest of rows are either white or orange. I have want to extract row which has the cell with bgcolor green using PERL code. Can somebody suggest me on how to do this. Any help is appreciated! Chintan
5
4,353
thread by: perlrmhu | last post Jan 3 '12 by: perlrmhu
I have files in ToTransfer folder on remote windows server. I need to move them to ToTransfre\Transferred folder. I am using sftp. The code below did not give me compile error but it did not work either. Can anyone please let know how to get it working? unless(move("ToTransfer\\$filelist->{filename}", "ToTransfer\\Transferred")) ...
2
2,110
thread by: dissectcode | last post Jan 2 '12 by: dissectcode
Hi: I'm stuck! I've tried a thousand things from forum suggestions...I need to parse the unit from a value and test that it exists based on known units (its not for school, its Jan 1..) #/usr/bin/perl my @unit = qw(mV V mA uA A K m uV nA nV pA pV); while( defined($line = <LOGFILE>) ) { if( $line =~ /d+(\s*\w+)/ )
3
2,592
thread by: el77c | last post Dec 29 '11 by: sathishkumar se
I am new to programing and am trying to learn. I am trying to use perl to merge to list of data. for example: list 1: aaaa bbbb cccc dddd list 2: aaaa bbbb cccc

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.