Search Discussions
-
Hi, I have a file, cat try.xpm a 1 b 2 c 3 d 4 abbbcaaaadddb I wish to use perl to translate the last line into the numerical value. #!/usr/bin/perl use warnings; use strict; open FILE, "<try.xpm" or ...
Lina
Feb 17, 2012 at 3:32 pm
Feb 17, 2012 at 10:57 pm -
Hello. I'm new in perl and have many questions. This my first programm. #!/usr/bin/perl use strict; use warnings; my $number = 0; my $_ = 0; print "Enter number:"; chomp($number = < ); if ( $number = ...
Vyacheslav
Feb 21, 2012 at 7:47 pm
Feb 23, 2012 at 11:34 am -
#!/usr/bin/perl $month = "December"; $year = "2007" ; header($month,$year); sub header { my $month = shift ; my $year = shift ; ######## here after shift the $year becomes null? ...
Lina
Feb 7, 2012 at 7:07 am
Feb 7, 2012 at 4:40 pm -
I have an HTML page that is updated automatically each day. I am using HTML::TreeBuilder to create and insert the new content. Most of the time, this works fine, but I've hit a snag when existing ...
Webley Silvernail
Feb 23, 2012 at 12:59 am
Feb 28, 2012 at 2:57 am -
Hi, #!/usr/bin/perl use strict; use warnings; sub add { $results = $_[0] + $_[1]; print "The result was: $results\n"; } add(1,2) $ ./subroutines_examples.pl Global symbol "$results" requires explicit ...
Lina
Feb 13, 2012 at 3:43 pm
Feb 15, 2012 at 3:31 am -
#!/usr/bin/perl use strict ; my @strings = ( "Fred and Barney", "Gilligan or Skipper", "Fred and Ginger" ); foreach my $string (@strings) { $string =~ m/(\S+)(and|or)(\S+)/; print "\$1: $1\n\$2: ...
Lina
Feb 9, 2012 at 4:44 am
Feb 9, 2012 at 5:05 pm -
I have a web form where people enter their address info and I want to make sure that the first three digits of their Zip Code correspond to their State. So I'm creating a hash of arrays that contains ...
Sono-io
Feb 6, 2012 at 9:14 pm
Feb 7, 2012 at 1:23 pm -
I came across a question early this morning on a forum that intrigued me. I literally spent about five hours trying everything to solve it, but I couldn't. Every attempt at recursion, counting, ...
Steve Bertrand
Feb 27, 2012 at 2:31 am
Mar 5, 2012 at 12:37 pm -
I'm running PERL under the MACOSX. The line $text=~s/george/tim/; causes a global substituion of "george" with "tim" How can I limit the substituion to the first instance only? Thanks!
Sb
Feb 22, 2012 at 2:37 am
Feb 23, 2012 at 1:07 am -
I am trying ot find a way to use an array as a reference to remove lines from a file. The array @keyFields has the elements "rcsm and cdmno". My objective is to remove any line from the input that ...
Chris Stinemetz
Feb 20, 2012 at 8:37 pm
Feb 21, 2012 at 4:44 pm -
Hi, I want to run a shell command with the following constraints: a. I like to get the return code of the command b. Furthermore I want to combine stdout and stderr so that the output comes in a ...
Manfred Lotz
Feb 26, 2012 at 7:32 pm
Mar 4, 2012 at 7:56 am -
Hello everyone. I just wanted to introduce myself to the list. Been following for a little while, first time posting. My name is Mike Dunaway and I am 25 years old. I was curious if there were any ...
Mike
Feb 28, 2012 at 1:03 am
Mar 1, 2012 at 3:45 am -
Do we have any Perl module which can parse any other perl script (or module) and fetch information like total number of arrays being used, total number of hashes, total number of scalar variables etc ...
Parag Kalra
Feb 8, 2012 at 10:20 pm
Feb 13, 2012 at 9:59 pm -
Hi All. I have a real issue with strings. I want to build a sub routine skeleton plus some test code. If I use () or {} etc. The string comes out completely messed up. The code below is for a heredoc ...
Sean Murphy
Feb 25, 2012 at 12:41 am
Feb 25, 2012 at 1:14 am -
Hi, Sorry to open a new thread, Use of uninitialized value within %dict in concatenation (.) or string at ./translate.pl line 21, <$fh line 128. Here is the whole code (based on the guide form all of ...
Lina
Feb 18, 2012 at 2:42 pm
Feb 19, 2012 at 5:48 am -
Hi, I am running my perl script and using some perl modules like below :- use File::Path qw(mkpath); use File::Rsync; my $rsync = '/opt/zimbra/rsync/bin/rsync'; when I run the script using perl ...
Punit Jain
Feb 15, 2012 at 6:13 pm
Feb 15, 2012 at 7:22 pm -
This script: ------- 8< snip ---------- 8< snip ---------- 8<snip ------- #!/usr/local/bin/perl use strict; use warnings; my ($seven, $nine) = (stat('./SweetwatterPk-016.jpg'))[7, 9]; print "$seven ...
Harry Putnam
Feb 10, 2012 at 5:53 pm
Feb 12, 2012 at 9:45 am -
I've been looking around, googling for a way to extract exif info from images. There are many tools out there. But I wanted to fiddle with the information in very specific ways. I hit on the perl ...
Harry Putnam
Feb 6, 2012 at 11:59 am
Feb 12, 2012 at 3:39 am -
Hi All. This should be a simple task. But for the life of me, I cannot work it out. I have a chunk of text in an scaler. I want to edit this text. I look at Term::ReadLine and couldn't see a way of ...
Sean Murphy
Feb 8, 2012 at 7:37 am
Feb 8, 2012 at 9:06 pm -
Hi there, I have a hash table where I want to do some action for each value in the hash table. Among other possibilities I could do like this: map { some_action($_) } values %ht; where let us say: ...
Manfred Lotz
Feb 20, 2012 at 7:09 pm
Feb 20, 2012 at 10:15 pm -
Hello all, I have a perl (Ver. 5.10.0) program running over an old machine which send messages with this code: my $smtp = Net::SMTP- new($dstMailServer, Timeout= 10, Debug= 0,); ...
Mailing lists
Feb 23, 2012 at 3:12 pm
Apr 2, 2012 at 7:39 am -
3
perl -E
Hi all, Lately, I have seen many command-line one-liners floating around with the -E argument: perl -E '#do stuff' Could somebody kindly remind me which perldoc I need to review to find out about the ...Steve Bertrand
Feb 24, 2012 at 3:32 pm
Feb 24, 2012 at 3:55 pm -
I have a for loop I would like to alter so that when the iteration reaches the last element in the array the varibale $lastmatch is passed to printf instead of $match. Does anyone have any ...
Chris Stinemetz
Feb 15, 2012 at 4:08 am
Feb 15, 2012 at 2:21 pm -
I found some one liners on this web page: http://www.techrepublic.com/article/use-command-line-perl-to-make-unix-administration-easier/1044668 This one appears not to work at all. Can anyone say why ...
Harry Putnam
Feb 13, 2012 at 10:28 pm
Feb 15, 2012 at 12:53 pm -
Hello: tl;dr: A program indended to split a large MS SQL script into smaller ones appears to be losing data. See below for the script. I guess that maybe I'm making a silly mistake with newlines or ...
Brandon McCaig
Feb 14, 2012 at 5:07 pm
Feb 14, 2012 at 7:29 pm -
Hello, Need a little assistance formatting numbers pulled from a databaes. Many are like this: 179550, 45960, 890458 etc. what I need to do is format these values with a comma so they look like this: ...
Mike Blezien
Feb 12, 2012 at 4:14 pm
Feb 12, 2012 at 4:55 pm -
I have inherited a script that processes the cron and comments stuff out for month end processing. We have added some store that do not run the same monthly calendar as the rest of the stores. What I ...
Clay Lovett
Feb 9, 2012 at 2:08 pm
Feb 12, 2012 at 1:35 am -
Hello, I am trying to create a CMAC out of some JSON data (I have a reason for doing this -- part of the authorization allowing my REST client to communicate with a server that requires it). I ...
John Refior
Feb 7, 2012 at 4:22 am
Feb 9, 2012 at 1:46 pm -
in the script this is all i am using JSON as: ... use JSON::XS; ... .... $return_json_text = encode_json $tmp_hash; this variable ($return_json_text) is then used to display values. I need this to be ...
Rajeev Prasad
Feb 6, 2012 at 4:05 am
Feb 6, 2012 at 9:24 am -
Hi all, I had a look at remove_tree from File::Path. Let us say I have a directory: ./a/b/c/d When I do remove_tree('./a', { verbose = 1 }); I get the following messages: rmdir d rmdir c rmdir b ...
Manfred Lotz
Feb 25, 2012 at 7:27 pm
Feb 26, 2012 at 8:08 am -
Hi All. I am trying to create my own CLI navigation program. I am using Term::Screen since it is nice and simple. I am aware that there are other modules out there which does all this. But I want to ...
Sean Murphy
Feb 19, 2012 at 1:45 am
Feb 21, 2012 at 11:53 am -
Hi, are there some intelligent modules or website, I send it a string, it can intelligently analysis the structures and gave me several options consisted of those regular expressions, Just curious, ...
Lina
Feb 18, 2012 at 1:40 pm
Feb 18, 2012 at 4:51 pm -
I need to make changes from FTP processing to SFTP processing. Has anyone tried to do this? If so, what did you try? I can connect under XP using SFTP::Foreign, but I end up in the Linux/Unix portion ...
Wagner, David --- Sr Programmer Analyst --- CFS
Feb 17, 2012 at 10:07 pm
Feb 18, 2012 at 12:30 am -
Hi , I have a quick question on Rsync. I am doing a rsync to remote server using code below : - use File::Rsync; my $source= "/backup/$TodaysDate"; my $ssh_server = '192.168.0.xxx'; my $destination = ...
Punit Jain
Feb 14, 2012 at 5:15 am
Feb 14, 2012 at 5:20 pm -
Dear List, I'm having difficulties with the following: Say you have a server program that listens on port 1234 The server handles requests and spawns a child process for every connection. If a client ...
Marco van Kammen
Feb 6, 2012 at 12:36 pm
Feb 7, 2012 at 4:43 pm -
#/usr/bin/perl until ($name eq ""); do { print "Enter another name, or Enter to stop:\n" ; $name = <STDIN ; chomp ($name); push @namelist,$name; } print @namelist $ ./generate_namelist.pl ...
Lina
Feb 7, 2012 at 4:36 am
Feb 7, 2012 at 5:20 am -
Folks, Forever I have used the following to run an external command on a Winders box: `cluster group "$Name"` (where name is the name of the cluster group in question) But today I had to run a script ...
Frank Kleinburg
Feb 2, 2012 at 5:03 pm
Feb 3, 2012 at 10:28 pm -
Hiya Im looking to buy perl cookbook. I see the second edition was released 2003. Before I go off and buy it, does anyone know if perl cookbook 3rd edition, is ever going to be published? Regards ...
Brent Clark
Feb 29, 2012 at 2:16 pm
Feb 29, 2012 at 2:19 pm -
Hi, I am not experienced in below choice after issue the perl -MCPAN -e shell What approach do you want? (Choose 'local::lib', 'sudo' or 'manual') /dev/sda10 6.5G 515M 5.7G 9% /usr/local /dev/sda9 ...
Lina
Feb 28, 2012 at 4:02 pm
Feb 28, 2012 at 5:02 pm -
I look for metod or variable which can give me information about position of the bottom corner of the table. I want to put text after table object in PDF. Rows in Table are creataind in dynamic way ...
Washide
Feb 22, 2012 at 7:57 am
Feb 22, 2012 at 1:02 pm -
I cant seem to get this module to work at all. I have Windows 7 Pro 64bit, Apache 2.2.14, Active Perl 5.14.2.1402 64 bit. Then I installed... ImageMagick-6.7.5-6-Q16-windows-x64-dll.exe. I checked ...
Skirv
Feb 20, 2012 at 11:08 am
Feb 20, 2012 at 12:16 pm -
Hi List , I have two files one is a csv file another is a XML files which are given here as attachments. Now I need to create a XML(Which is given here) file from this CSV file(Also here as an ...
Anirban Adhikary
Feb 15, 2012 at 7:19 pm
Feb 16, 2012 at 2:23 pm -
hi guys hi master of "Fu" any update I am doing some research on the server and client for the chat. I have long taken the trouble to consult the documentation that is different and both PerlMonks ...
Ml
Feb 15, 2012 at 7:51 pm
Feb 15, 2012 at 8:04 pm -
Hi All, foreach my $ncbi_tax_id ( keys %{$new_proteins}) { my %kegg_map = (); my $up_tax_map = read_map ( "$up_maps_dir/$taxon_labels{$ncbi_tax_id}.map"); foreach my $gene_id ( keys %{$new_proteins- ...
Venkates
Feb 13, 2012 at 4:09 pm
Feb 13, 2012 at 5:40 pm -
sub display_hash { my (%hash) = @_; foreach (%hash) { print "$_ = $hash{$_}\n"; } } display_hash('name' = 'Mar', 'distance' = 'forget'); distance = forget Use of uninitialized value in concatenation ...
Lina
Feb 13, 2012 at 4:41 pm
Feb 13, 2012 at 4:54 pm -
Hi, I have some (probably very stupid) problem when trying to search in perldoc in my computer (MacOSX 10.7.2), see: maccasandra:~ mcasandrariera$ perldoc perltoc No documentation found for ...
Casandra riera ribas
Feb 10, 2012 at 4:26 pm
Feb 10, 2012 at 4:44 pm -
Author says: Adding and removing rows To create a new record in the database, you can use the create method. It returns an instance of My::Schema::Result::Album that can be used to access the data in ...
Rajeev Prasad
Feb 5, 2012 at 3:29 am
Feb 5, 2012 at 2:41 pm -
Hi All' I need a execute oracle command on remote db server using perl and I try with following but it not work. Can any one Suggest way to do this without using DBI or any module. ===CODE======= my ...
Charith
Feb 2, 2012 at 4:47 am
Feb 2, 2012 at 4:47 am
65 users for February 2012
Archives
- May 2016 (29)
- March 2016 (38)
- February 2016 (66)
- January 2016 (62)
- December 2015 (36)
- November 2015 (59)
- October 2015 (35)
- September 2015 (32)
- April 2015 (18)
- March 2015 (101)
- February 2015 (74)
- January 2015 (99)
- December 2014 (74)
- November 2014 (65)
- October 2014 (47)
- September 2014 (66)
- August 2014 (68)
- July 2014 (171)
- June 2014 (85)
- May 2014 (126)
- April 2014 (36)
- March 2014 (162)
- February 2014 (154)
- January 2014 (94)
- December 2013 (42)
- November 2013 (71)
- October 2013 (192)
- September 2013 (143)
- August 2013 (114)
- July 2013 (141)
- June 2013 (201)
- May 2013 (163)
- April 2013 (90)
- March 2013 (125)
- February 2013 (150)
- January 2013 (185)
- December 2012 (120)
- November 2012 (101)
- October 2012 (117)
- September 2012 (180)
- August 2012 (319)
- July 2012 (170)
- June 2012 (223)
- May 2012 (249)
- April 2012 (298)
- March 2012 (311)
- February 2012 (261)
- January 2012 (155)
- December 2011 (282)
- November 2011 (266)
- October 2011 (316)
- September 2011 (369)
- August 2011 (371)
- July 2011 (310)
- June 2011 (392)
- May 2011 (434)
- April 2011 (630)
- March 2011 (440)
- February 2011 (282)
- January 2011 (419)
- December 2010 (319)
- November 2010 (314)
- October 2010 (360)
- September 2010 (256)
- August 2010 (223)
- July 2010 (340)
- June 2010 (298)
- May 2010 (483)
- April 2010 (683)
- March 2010 (480)
- February 2010 (339)
- January 2010 (322)
- December 2009 (531)
- November 2009 (558)
- October 2009 (375)
- September 2009 (449)
- August 2009 (497)
- July 2009 (428)
- June 2009 (306)
- May 2009 (293)
- April 2009 (362)
- March 2009 (477)
- February 2009 (467)
- January 2009 (408)
- December 2008 (405)
- November 2008 (545)
- October 2008 (770)
- September 2008 (662)
- August 2008 (663)
- July 2008 (773)
- June 2008 (730)
- May 2008 (650)
- April 2008 (791)
- March 2008 (692)
- February 2008 (399)
- January 2008 (694)
- December 2007 (581)
- November 2007 (688)
- October 2007 (882)
- September 2007 (709)
- August 2007 (1,243)
- July 2007 (849)
- June 2007 (898)
- May 2007 (796)
- April 2007 (587)
- March 2007 (705)
- February 2007 (521)
- January 2007 (578)
- December 2006 (565)
- November 2006 (555)
- October 2006 (704)
- September 2006 (734)
- August 2006 (725)
- July 2006 (884)
- June 2006 (681)
- May 2006 (703)
- April 2006 (889)
- March 2006 (724)
- February 2006 (607)
- January 2006 (588)
- December 2005 (684)
- November 2005 (664)
- October 2005 (682)
- September 2005 (616)
- August 2005 (743)
- July 2005 (716)
- June 2005 (670)
- May 2005 (809)
- April 2005 (830)
- March 2005 (1,020)
- February 2005 (740)
- January 2005 (784)
- December 2004 (873)
- November 2004 (910)
- October 2004 (1,242)
- September 2004 (936)
- August 2004 (911)
- July 2004 (1,101)
- June 2004 (1,026)
- May 2004 (945)
- April 2004 (1,161)
- March 2004 (1,485)
- February 2004 (1,608)
- January 2004 (1,512)
- December 2003 (1,607)
- November 2003 (1,437)
- October 2003 (1,314)
- September 2003 (1,382)
- August 2003 (1,351)
- July 2003 (1,559)
- June 2003 (1,576)
- May 2003 (1,586)
- April 2003 (1,600)
- March 2003 (1,731)
- February 2003 (1,641)
- January 2003 (2,020)
- December 2002 (1,360)
- November 2002 (1,198)
- October 2002 (1,677)
- September 2002 (1,905)
- August 2002 (1,685)
- July 2002 (1,975)
- June 2002 (1,900)
- May 2002 (2,332)
- April 2002 (2,098)
- March 2002 (1,658)
- February 2002 (2,237)
- January 2002 (2,304)
- December 2001 (1,568)
- November 2001 (1,823)
- October 2001 (1,712)
- September 2001 (1,289)
- August 2001 (1,993)
- July 2001 (2,424)
- June 2001 (3,399)
- May 2001 (1,797)
- April 2001 (650)