FAQ

Search Discussions

80 discussions - 362 posts

  • Hi, I saw some code like this today: !/bin/perl -w package My::Package; use strict; ... %My::Package::somehash = ( keyone = 'val', keytwo = 'val2'); The My::Package::somehash isn't declared as with ...
    DermotDermot
    Apr 28, 2009 at 10:36 am
    May 1, 2009 at 8:13 pm
  • Hi I had this semi-working, changed something and can't remember where I went right, so would appreciate some help getting back on top. I know 1..10 and 2..10 probably won't work in the following ...
    BrianBrian
    Apr 17, 2009 at 5:02 pm
    Apr 20, 2009 at 9:07 am
  • I'd like to take a string and manipulate it in a few ways. If the string is 34 characters or less, I'd like to append a colon character and save it to $var1. If the string is longer than 34 ...
    GrantGrant
    Apr 21, 2009 at 3:58 pm
    Apr 22, 2009 at 3:00 am
  • Hi how to write regular expressions matching against Unicode (eg., UTF-8) strings? For instance, in my regexp: qr/^([.< @ \w])*$/ I am using \w because here: http://perldoc.perl.org/perlretut.html it ...
    Stanisław T. FindeisenStanisław T. Findeisen
    Apr 18, 2009 at 9:34 am
    Apr 24, 2009 at 8:56 pm
  • So, I've done the "Learning Perl" book, and frustrating myself no end by trying to write a chess program using just the knowledge contained in "Learning Perl" and with no modules. I thought about ...
    Richard HobsonRichard Hobson
    Apr 8, 2009 at 12:08 pm
    Apr 10, 2009 at 2:54 pm
  • Hi, I have a $string that is separated by , and space; boy, pig, 123, 123:412adbd, d0g, lajdlf134 <<_ lkadsf !234, Now I want to capture the string(s) between last two commas. It consists of anything ...
    Michael AlipioMichael Alipio
    Apr 14, 2009 at 10:06 am
    Apr 19, 2009 at 9:15 pm
  • is it true that perl will be just as fast as c for reading files ? for example will below be as fast as if it were written in c? I said this because on random posts, I see that perl is optimized to ...
    RickRick
    Apr 14, 2009 at 3:49 pm
    Apr 16, 2009 at 3:18 pm
  • Hi, I am trying to execute the below line in the perl program and returns a value 0. my $test2 = ""; my $include = "file"; $test2 = system("/usr/atria/bin/cleartool desc \$include | grep created | ...
    Rajini NaiduRajini Naidu
    Apr 15, 2009 at 1:20 pm
    Apr 15, 2009 at 2:49 pm
  • Hi Gurus, I need to connect to MSSQL SERVER (express edition on remote system) through a perl script. But I get the following error with the code below can any body help me in that. ############ ...
    Perl praPerl pra
    Apr 14, 2009 at 1:55 pm
    Apr 15, 2009 at 10:11 am
  • Hello, I have seen some Perl scripts where some times these lines are mentioned in the begining of the script can any body explain these lines. *Script-1* use DBI; # What is been called here. use ...
    Raheel HassanRaheel Hassan
    Apr 16, 2009 at 3:15 pm
    Apr 23, 2009 at 1:34 pm
  • Hi All, I have one perl script in which i am using win32:OLE perl module. Now i need to convert script so that it can support solaris OS also. can it be possible?? if yes what is the equivalant ...
    Irfan SayedIrfan Sayed
    Apr 1, 2009 at 11:18 am
    Apr 2, 2009 at 11:20 am
  • Hi all, I have some basic code that I want to pull out the web addresses from web pages. Would like to keep it as basic as possible for easy reading. The line to replace http with newline seems to ...
    PerlPerl
    Apr 14, 2009 at 12:03 pm
    Apr 16, 2009 at 10:52 am
  • Hi, could someone please help me with this little problem? I am trying to include an if statement part way through printing. When the program reaches the line if ($Lang = fr ) { print " that line ...
    BrianBrian
    Apr 15, 2009 at 5:09 am
    Apr 15, 2009 at 1:05 pm
  • Hello everyone, I have a program that needs to find straights in a hand of cards. The hand is a string with no whitespace sorted by the cards' ranks, eg "9d10cJhQsKd". How can I identify if that hand ...
    Andrew FithianAndrew Fithian
    Apr 12, 2009 at 10:34 pm
    Apr 13, 2009 at 11:31 am
  • 6

    LWP

    I have a file stored at a location: http://parent_dir/file Which among gazillion LWP options can I use to download and store the file on my machine? TIA Anjan -- ============================= anjan ...
    ANJAN PURKAYASTHAANJAN PURKAYASTHA
    Apr 8, 2009 at 7:22 pm
    Apr 9, 2009 at 12:11 am
  • Hi, I have a kind of user defined xml file where users enter their test information. I need to parse the xml file, get the relevant data and then use the test information to invoke low level scripts ...
    Sharan BasappaSharan Basappa
    Apr 29, 2009 at 11:00 am
    Apr 30, 2009 at 12:54 am
  • I want a script that constantly accepts user input, but runs a subroutine every second to do other work. My attempt: $|=1; $SIG{'ALRM'}= "\&alarm_sub"; &alarm_sub; while (< ) {print "You typed: ...
    Kelly JonesKelly Jones
    Apr 1, 2009 at 12:48 pm
    Apr 2, 2009 at 2:04 am
  • Hi all, The get function in the libwww-perl library would be really useful to me, but I'm having problems making it work. When I use it in a cgi script (it's ultimate destination) it fails. My ...
    hOURShOURS
    Apr 21, 2009 at 10:27 pm
    Apr 22, 2009 at 4:45 pm
  • Hi, I am trying to initiate a hash once when the package is loaded (via modperl). I don't want to make repeated DB queries for this data so I'd like to populate the hash when my daemon starts and not ...
    DermotDermot
    Apr 20, 2009 at 3:21 pm
    Apr 20, 2009 at 5:11 pm
  • Now that I am learning how to work with complex data structures, I find myself writing things like this a lot: my $foo = ( defined $very_long_expression ? $very_long_expression : "n/a" ); or my $foo ...
    Chap HarrisonChap Harrison
    Apr 18, 2009 at 3:02 am
    Apr 18, 2009 at 8:16 pm
  • Hello, I would like to know, how to force perl unfold "foreach" expression during the compilation, i.e. I want next code: foreach (1..100) { block } to be compiled like this: block[$_ = 1] block[$_ = ...
    Edwin6Edwin6
    Apr 16, 2009 at 8:39 pm
    Apr 18, 2009 at 5:43 pm
  • Hi, I am facing an error while executing the Perl script, its compilation fails with the following error "Can't call method "execute_flow" without a package or object reference at <addr " Code ...
    Fatema MFatema M
    Apr 16, 2009 at 4:18 am
    Apr 17, 2009 at 10:15 pm
  • Greetings, What's the easy way to calculate a webpage's downloading time? (not only the page, but all the elements in this page, like images, JS, css etc). For example, I want to get a function: my ...
    PracticalperlPracticalperl
    Apr 15, 2009 at 1:38 pm
    Apr 16, 2009 at 12:23 am
  • Hi, I have a program that constantly displays values on the screen. The program 'ping' for example. What I'd like to do is watch the output and as soon as i see some values, i would do something. For ...
    Michael AlipioMichael Alipio
    Apr 12, 2009 at 6:14 pm
    Apr 13, 2009 at 3:26 am
  • Hello, I am a complete beginner - no programming background. I want to begin with Perl and I decided to by Randal's book "*Learning Perl*". I seem to have been progressing smoothly till when I ...
    Joseph Mwesigwa BbaaleJoseph Mwesigwa Bbaale
    Apr 2, 2009 at 11:06 am
    Apr 2, 2009 at 6:24 pm
  • Hi, Using the DBI module, I've retrieved a row set from a database. I have an $ary_ref with which to access the data. As I understand it, $ary_ref is: a reference to ... an array of references to ... ...
    Chap HarrisonChap Harrison
    Apr 1, 2009 at 6:23 pm
    Apr 2, 2009 at 6:33 am
  • Hi, I wanted to the Net::SSH::Perl but perl complained about a missing Math::GMP. So did a cpan install Math::GMP and finally found ...
    SCHWARTZKOPFF, Michael, Dr. \(Extern\)SCHWARTZKOPFF, Michael, Dr. \(Extern\)
    Apr 28, 2009 at 9:15 am
    Apr 29, 2009 at 2:35 am
  • Hello all, I am giving a presentation soon and will be talking a bit about perl. I'd like to include an image about perl that describes it as the Swiss army chainsaw. Ideally, I'd like to have a red ...
    Robert CitekRobert Citek
    Apr 20, 2009 at 10:14 pm
    Apr 24, 2009 at 12:10 pm
  • I want foo() and bar() to do the same thing. One way to do this: sub foo {return bar(@_);} Is there a more clever way using \&bar and things like that? -- We're just a Bunch Of Regular Guys, a ...
    Kelly JonesKelly Jones
    Apr 21, 2009 at 11:59 pm
    Apr 22, 2009 at 1:46 pm
  • Hi, I have copied the example "match.c" from "man perlembed" to my system and made a minor adjustment to the source to test the match code. I have attempted to build this code and the build is ...
    Keith.GriffinKeith.Griffin
    Apr 20, 2009 at 2:44 pm
    Apr 20, 2009 at 7:37 pm
  • I'm trying to use the Google::Adwords perl modules but I'm getting: Bareword "Google::Adwords::Campaign" not allowed while "strict subs" in use Here is the beginning of my script: use ...
    GrantGrant
    Apr 19, 2009 at 8:07 pm
    Apr 20, 2009 at 2:53 pm
  • perl -lane' print "$F[0] ", "$F[4]" , " $F[5]";' Is there anyway to incoporate $\ <- output record separtor to do this instead of printing out w/ manual spaces beteween the variables?
    RickRick
    Apr 13, 2009 at 7:40 pm
    Apr 14, 2009 at 3:41 pm
  • I "cpan Text::Unidecode" on 2 machines and then ran this code: use utf8; use Text::Unidecode; print unidecode("\x{5317}\x{4EB0}")."\n"; print unidecode("\xd0\x90\xd0\xbb")."\n"; print ...
    Kelly JonesKelly Jones
    Apr 12, 2009 at 12:51 am
    Apr 13, 2009 at 5:33 pm
  • Hello everybody, I need to write a Perl CGI script to login from one system (A) into remote system (B) and do a ping to the third system (C). As of now, I have successfully written the code in Perl ...
    Amit SaxenaAmit Saxena
    Apr 1, 2009 at 5:04 pm
    Apr 12, 2009 at 5:21 pm
  • I want to replace all the o's in a string with x's or y's and all the a's in a string with u's or v's. Example: given string "foobar", the output would be this list of strings fxxbur (change both o's ...
    Kelly JonesKelly Jones
    Apr 10, 2009 at 7:32 pm
    Apr 11, 2009 at 2:48 pm
  • I need a Bernoulli random number generator which takes as inputs: a value for p(1) (probability of choosing a "1") and the number of trials and outputs a series of 0s and 1s according to the model ...
    ANJAN PURKAYASTHAANJAN PURKAYASTHA
    Apr 9, 2009 at 9:34 pm
    Apr 10, 2009 at 2:03 am
  • Hi All, i want to check whether a particular software is installed or not through perl script. if it is installed then uninstall that software and start installation freshly. if it is not installed ...
    Irfan SayedIrfan Sayed
    Apr 6, 2009 at 9:19 am
    Apr 6, 2009 at 1:29 pm
  • In order to call them from menubuttons I moved my code into subroutines. sub open_file { if ( ! open NEWFILE, "<$file") { die "Could Not Open $file: $!" } else { my @lines = <NEWFILE ; $message = ...
    Thomas H. GeorgeThomas H. George
    Apr 5, 2009 at 3:46 pm
    Apr 6, 2009 at 1:07 pm
  • I checked perldoc documents but didn't find a default timeout value for IO::Socket::INET object. Who knows that? thanks. regards, Jeff.
    Jeff PangJeff Pang
    Apr 2, 2009 at 12:11 pm
    Apr 2, 2009 at 12:47 pm
  • Hi folks, I've created a log file in my code, and I print various strings to it as I go through my program. The problem is that everything is showing up on one line for each iteration of my main ...
    Dave ThackerDave Thacker
    Apr 30, 2009 at 8:03 pm
    Apr 30, 2009 at 8:23 pm
  • Hi, I have a script that forks a child. at the parent, i have a line that tells it to sleep for n seconds. Once the 3 seconds have passed, it will kill the child process. I noticed that most of the ...
    Michael AlipioMichael Alipio
    Apr 22, 2009 at 1:27 pm
    Apr 22, 2009 at 6:43 pm
  • I want to do "function completion". If I have functions called where() and which(), I want whe() to call where(), whi() to call which(), and wh() to return something like "Ambigious: where() and ...
    Kelly JonesKelly Jones
    Apr 22, 2009 at 12:00 am
    Apr 22, 2009 at 1:26 am
  • Are there any gotchas for using qx() to run system commands versus backticks? Robert
    R. HicksR. Hicks
    Apr 19, 2009 at 7:39 pm
    Apr 19, 2009 at 7:48 pm
  • Hi Gurus, I need to connect to MSSQL SERVER (express edition on remote system) through a perl script. But I get the following error with the code below can any body help me in that. ############ ...
    Perl praPerl pra
    Apr 16, 2009 at 9:27 am
    Apr 19, 2009 at 11:54 am
  • Hi, Is it possible to strip email attachments from a remote IMAP folders & save or download them on local system (system on which script is running) I written a simple script using perl IMAPClient ...
    Meghanand AcharekarMeghanand Acharekar
    Apr 18, 2009 at 10:27 am
    Apr 18, 2009 at 8:12 pm
  • Greetings, I need to be able to re-read a file every 60 seconds until the two changing values are the same in my data file. Once the values become the same the script simply exits. Not exactly sure ...
    NabeelNabeel
    Apr 18, 2009 at 8:10 am
    Apr 18, 2009 at 10:56 am
  • Hi, I have this code: die "Could not fork command1!" unless defined (my $command1_pid = fork); if ($command1_pid == 0){ open EXTERNAL_PROG1, "external_prog1 |" or die "Can't run external_prog1"; ...
    Michael AlipioMichael Alipio
    Apr 16, 2009 at 12:32 pm
    Apr 16, 2009 at 2:35 pm
  • Hey list, I'm sure you can direct me: I have several packages together in one file and now I would like "use" the packages. Now my problem is that Perl's "use" wants to have a file and does not ...
    Patrick KirschPatrick Kirsch
    Apr 15, 2009 at 7:24 am
    Apr 15, 2009 at 1:19 pm
  • Hello, I am facing problems in executing cgi programs, on Apache web server, can any body tell me how i can configure my Apache server so that it can support CGI and Msql. I also wanted to enable ssl ...
    Raheel HassanRaheel Hassan
    Apr 13, 2009 at 5:27 pm
    Apr 13, 2009 at 6:15 pm
  • Hi, My program looks like this: my $pid = fork (); if ($pid == 0){ exec ("top"); }else{ my $time = 0 while (<1 ){ sleep 1; $time++; if ($time == 10){ kill 9, $pid; } } } That is, after running the ...
    Michael AlipioMichael Alipio
    Apr 13, 2009 at 8:49 am
    Apr 13, 2009 at 11:59 am
Group Navigation
period‹ prev | Apr 2009 | next ›
Group Overview
groupbeginners @
categoriesperl
discussions80
posts362
users84
websiteperl.org

84 users for April 2009

Chas. Owens: 72 posts Gunnar Hjalmarsson: 25 posts John W. Krahn: 22 posts Brian: 14 posts Jim Gibson: 13 posts Michael Alipio: 12 posts Grant: 10 posts Jenda Krynicky: 9 posts Kelly Jones: 8 posts Dermot: 7 posts Irfan Sayed: 7 posts Wagner, David --- Senior Programmer Analyst --- CFS: 7 posts Jay Savage: 6 posts Jeff Pang: 6 posts ANJAN PURKAYASTHA: 5 posts Dr.Ruud: 5 posts Owen: 5 posts Perl pra: 5 posts Raheel Hassan: 5 posts Richard Hobson: 5 posts
show more
Archives