FAQ

Search Discussions

49 discussions - 261 posts

  • 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 ...
    LinaLina
    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 = ...
    VyacheslavVyacheslav
    Feb 21, 2012 at 7:47 pm
    Feb 23, 2012 at 11:34 am
  • 12

    match

    $mystring3="abacadeusagaka35"; if($mystring =~ m/(a.+)/g){ print $1,"\n"; } Hi, I wonder how to print the "abacad" out? Thanks for any suggestions, Best regards,
    LinaLina
    Feb 13, 2012 at 1:48 pm
    Feb 18, 2012 at 2:30 pm
  • #!/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? ...
    LinaLina
    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 SilvernailWebley 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 ...
    LinaLina
    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: ...
    LinaLina
    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-ioSono-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 BertrandSteve 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!
    SbSb
    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 StinemetzChris 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 LotzManfred 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 ...
    MikeMike
    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 KalraParag 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 MurphySean 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 ...
    LinaLina
    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 JainPunit 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 PutnamHarry 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 PutnamHarry 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 MurphySean 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 LotzManfred 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 listsMailing lists
    Feb 23, 2012 at 3:12 pm
    Apr 2, 2012 at 7:39 am
  • 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 BertrandSteve 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 StinemetzChris 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 PutnamHarry 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 McCaigBrandon 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 BlezienMike 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 LovettClay 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 RefiorJohn 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 PrasadRajeev 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 LotzManfred 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 MurphySean 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, ...
    LinaLina
    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 --- CFSWagner, 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 JainPunit 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 KammenMarco 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 ...
    LinaLina
    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 KleinburgFrank 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 ClarkBrent 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 ...
    LinaLina
    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 ...
    WashideWashide
    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 ...
    SkirvSkirv
    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 AdhikaryAnirban 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 ...
    MlMl
    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- ...
    VenkatesVenkates
    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 ...
    LinaLina
    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 ribasCasandra 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 PrasadRajeev 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 ...
    CharithCharith
    Feb 2, 2012 at 4:47 am
    Feb 2, 2012 at 4:47 am
Group Navigation
period‹ prev | Feb 2012 | next ›
Group Overview
groupbeginners @
categoriesperl
discussions49
posts261
users65
websiteperl.org

65 users for February 2012

Lina: 32 posts Rob Dixon: 18 posts Shawn H Corey: 18 posts John W. Krahn: 13 posts Igor Dovgiy: 12 posts Timothy adigun: 11 posts Shlomi Fish: 10 posts Jim Gibson: 9 posts Steve Bertrand: 9 posts Harry Putnam: 8 posts Jeff Peng: 8 posts Brandon McCaig: 7 posts Dr.Ruud: 6 posts Manfred Lotz: 6 posts Sean Murphy: 6 posts Chris Stinemetz: 5 posts Parag Kalra: 5 posts Rajeev Prasad: 4 posts Uri Guttman: 4 posts Webley Silvernail: 4 posts
show more
Archives