FAQ

Search Discussions

186 discussions - 716 posts

  • This might be better suited for the DBI list, but primarily I'm interested in learning more about the things necessary to enable me to take an existing module's object and make its data persistent ...
    Scott R. GodinScott R. Godin
    Jul 13, 2005 at 5:07 pm
    Aug 24, 2005 at 4:32 pm
  • Eliyah KiladaEliyah Kilada
    Jul 4, 2005 at 7:02 am
    Aug 29, 2005 at 11:03 am
  • I'd like to turn array @tmp from: (1,2,3) to (1,"|",2,"|",3) I'm using: @tmp = split(' ', join(" | ", @tmp)); ... but it seems like a waste to create a string and then split it back up again. As a ...
    Bryan R HarrisBryan R Harris
    Jul 20, 2005 at 6:09 pm
    Jul 21, 2005 at 10:39 am
  • Is there some way to really round a number to a given number of digits after the point? For example (1 digit): 12.3 -- 12.3 12.34 -- 12.3 12.35 -- 12.4 12.349 -- 12.3 sprintf doesn't seem to work: $ ...
    Jorge AlmeidaJorge Almeida
    Jul 12, 2005 at 7:27 am
    Jul 12, 2005 at 10:09 pm
  • Perlers, I'm working on a script that will generate a listing of files on a regular basis so that I can create hyperlinks to each respective file. As you see from the sorted output below, though it ...
    Ryan FrantzRyan Frantz
    Jul 6, 2005 at 8:06 pm
    Jul 7, 2005 at 5:02 pm
  • 9

    FAQ

    Kindly tell the pseudocode to solve the following problem: An user input is provided to a perl program by STDIN. This input is utilised by a fortran program to perform some function. How do i connect ...
    Madhurima dasMadhurima das
    Jul 6, 2005 at 11:33 am
    Jul 7, 2005 at 12:42 pm
  • A script like this: line1: $string3 = "bacdeabcdefghijklabcdeabcdefghijkl"; line2: $string4 = "xxyyzzbatttvv"; line3: print "\$1 = $1 \@{$-[0],$+[0]}, \$& = $&\n" if($string3 =~ /(a|b)*/); line4: ...
    Pine YanPine Yan
    Jul 29, 2005 at 6:05 pm
    Jul 29, 2005 at 11:51 pm
  • hi , I am a perl newbie. Can someone suggest a perl command line snippet that will print the last n lines of a file. thanks in advance. regards, Kaushik Notice: The information contained in this ...
    Kaushik MKaushik M
    Jul 25, 2005 at 2:47 pm
    Jul 26, 2005 at 6:47 pm
  • Hi, this does not work: mkdir "/some/dir/newsubdir" or die "$!"; while this does: chdir "/some/dir"; mkdir "newsubdir/" or die "$!"; In the shell, I can obviously execute the former. Is it true that ...
    Jan EdenJan Eden
    Jul 26, 2005 at 8:06 am
    Jul 26, 2005 at 1:56 pm
  • Is there an easier, more compact way to convert two arrays, on with keys and the other with values, into a hash? I have this sample code: 1 #!/usr/local/bin/perl -w 2 3 my $hash ; 4 my @keys =qw(col1 ...
    Robert CitekRobert Citek
    Jul 19, 2005 at 10:16 pm
    Jul 21, 2005 at 4:11 pm
  • I have an array: my @employee = ( [29243, 'john', 'John doe'], [24322, 'jane', 'Jane doe'], [27282, 'james', 'James doe'] ); Is there any builtin function in perl to sort the above array based on ...
    BeastBeast
    Jul 13, 2005 at 11:09 am
    Jul 15, 2005 at 7:48 pm
  • Hello All, I have a query about using "ssh" programmatically. I tried using both system and exec, but didn't work. I mean, I wanted some processing to happen on the remote machine to which i connect ...
    Dhanashri BhateDhanashri Bhate
    Jul 8, 2005 at 5:30 am
    Jul 8, 2005 at 2:16 pm
  • Hi, I don't not understand how the $#{$array_r} returns "highest" element as 4 and not 5??? #!/usr/bin/perl use warnings; use strict; my @array = (1,2,3,4,5); my $array_r = \@array; print "the ...
    Vineet PandeVineet Pande
    Jul 29, 2005 at 10:25 am
    Aug 17, 2005 at 1:57 pm
  • Hello listers I'm trying to use the following 'use lib' statement as described at.... http://www.unix.org.ua/orelly/perl/prog3/ch31_13.htm use lib "$ENV{HOME}/libperl"; # add ~/libperl In a *test* ...
    Tony FrasketiTony Frasketi
    Jul 27, 2005 at 12:51 am
    Aug 1, 2005 at 6:00 pm
  • Hi, I wanted to append two subsequent characters (non *) in an array and then storing them into new array. But then I also want to restore the '*' string in its initial position in the new array ...
    Edward WIJAYAEdward WIJAYA
    Jul 29, 2005 at 5:11 pm
    Aug 1, 2005 at 6:44 am
  • Is there a way to determine in perl whether the current script was run from a login shell or not? - B
    Bryan R HarrisBryan R Harris
    Jul 27, 2005 at 3:41 pm
    Jul 30, 2005 at 2:12 am
  • Hi All, Can anyone provide me the site which have good teaching material for perl. I need to give training on perl basics and I don't have time to prepare the material. Thanks in advance. ...
    Nilay Puri, NoidaNilay Puri, Noida
    Jul 1, 2005 at 2:25 am
    Jul 17, 2005 at 7:42 pm
  • I have this perl script which is taking value from an external appliaction and then after processing it is passing back a value to same application. But I was not able to figure out how can I define ...
    PerlPerl
    Jul 12, 2005 at 3:44 pm
    Jul 14, 2005 at 4:36 am
  • Hi all, After I passed a hash ref to a subroutine, how can I see what the hash name was? i.e.: my %hash1 = ( one = 1, two = 2 ); check_limit(\%hash1); sub check_limit { my $hname = $_[0]; my $num = ...
    Tielman Koekemoer \(TNE\)Tielman Koekemoer \(TNE\)
    Jul 4, 2005 at 9:31 am
    Jul 5, 2005 at 5:20 am
  • Does perl allow you to conditionally include a module? For example: #!/usr/bin/perl -w use strict; my $DEBUG = 0; if (DEBUG) { use diagnostics; } my $filename = "test$$.txt"; open (FH , " $filename") ...
    Dave AdamsDave Adams
    Jul 26, 2005 at 8:55 pm
    Jul 29, 2005 at 6:11 pm
  • I'm sure this is very simple and I am overlooking something. I want to read a list of bad email addresses from a file and remove them from my database. If I print $_, the email addresses are correct, ...
    Charles FarinellaCharles Farinella
    Jul 18, 2005 at 3:16 pm
    Jul 19, 2005 at 8:33 pm
  • Hi: I need to run a script noted by $cmd1 from within perl but before that i need to set the environment variable. how can i do it? I tried my $TEMPHOME = "/tmp"; system($cmd1); But the script still ...
    Nishi PrafullNishi Prafull
    Jul 18, 2005 at 8:20 pm
    Jul 19, 2005 at 4:43 am
  • Hi all, Is it possible to limit memory used by perl? I don't want perl program to eat all memory causing OS to freeze. -- --beast
    BeastBeast
    Jul 14, 2005 at 11:24 am
    Jul 18, 2005 at 3:30 pm
  • Hi, I would like to load a file to a hash so I will be able to call a specific number in that hash: use strict; use warnings; my %hash = (); open IN, "< $ARGV[0]" || die "could not open $ARGV[0]\n"; ...
    Jakob KofoedJakob Kofoed
    Jul 15, 2005 at 9:05 am
    Jul 15, 2005 at 10:24 pm
  • Hello everyone, I want someone to share his expertise on the following: Suppose we have a table with some data that periodically must be synced with an external source, which provides only partial ...
    Peter RabbitsonPeter Rabbitson
    Jul 10, 2005 at 3:09 pm
    Jul 10, 2005 at 5:34 pm
  • here is the snippet from the code: -------- ... my $selectHandle = $dbh- prepare(...); ... $selectHandle- execute(....); my @data = $selectHandle- fetchrow_array(); $self- [1] = \$data; .... -------- ...
    Denis N.Denis N.
    Jul 25, 2005 at 11:24 am
    Aug 2, 2005 at 8:28 am
  • *** SORRY, forgot to attach file. *** Hi, This is basically my 1st perl script. It's a podcast download app. I don't now the etiquette for attaching files, but I have attached a <100 line perl file. ...
    AlexeijhAlexeijh
    Jul 29, 2005 at 11:40 pm
    Jul 31, 2005 at 2:48 pm
  • See following sample code: <CODE use warnings; use strict; my @address = ("http://test", "http://", "www", "", "ftp:/foo" ); for (@address) { print "\"$_\" passed! \n" if /^((http|ftp):\/\/)?.+$/; } ...
    Bingfeng zhaoBingfeng zhao
    Jul 29, 2005 at 5:51 am
    Jul 29, 2005 at 11:02 pm
  • I have discovered that my Oracle installation has the DBI.pm module in it. I really want to use this, but don't know how to have the @INC see it when I do: oracle perl -e "use DBI;" Can't locate ...
    Jay CavinessJay Caviness
    Jul 27, 2005 at 7:00 pm
    Jul 28, 2005 at 3:32 pm
  • All this came from one error. I usually get one line of goo from a die statement. How did he get so much wonderful information? Can't call method "body" on an undefined value at ...
    Tom AllisonTom Allison
    Jul 26, 2005 at 2:05 am
    Jul 28, 2005 at 4:24 am
  • Hi folks, I'm working on a project where I'm given a pool of users and I have to determine if there are any messages in their spool files, and if so, forward them on to a new user. I'm looking for ...
    Rich FernandezRich Fernandez
    Jul 27, 2005 at 12:54 pm
    Jul 28, 2005 at 12:14 am
  • I shortened this up a bit: perl -e 'open FH, "$filename"; @lines=reverse <FH ; print $lines[$_] foreach reverse 0..$n;' Where "$filename" is replaced with the name of the file and "$n" is replaced ...
    Larsen, Errin M HMMA/Information Technology DepartmentLarsen, Errin M HMMA/Information Technology Department
    Jul 25, 2005 at 3:36 pm
    Jul 25, 2005 at 11:52 pm
  • Hi all Think I have a better unstanding of the use of () for my regex search, but this morning I have a new set of problems, whereby I need to perform a search and replace and then pass on to the new ...
    Brent ClarkBrent Clark
    Jul 22, 2005 at 10:49 am
    Jul 23, 2005 at 1:10 pm
  • All, I am wanting to improve my code b/c I am making 3 identical system calls. So I thought a subroutine with that one call and LABELS for each condition would improve it. Is this possible b/c I am ...
    DbsmithDbsmith
    Jul 21, 2005 at 5:58 pm
    Jul 22, 2005 at 7:01 pm
  • I want to create a variable, to be used for other stuff, using today's date. Can anyone help me with the second last line? use Time::localtime; my $tm = localtime; printf("The current date is ...
    Dave AdamsDave Adams
    Jul 21, 2005 at 8:04 pm
    Jul 21, 2005 at 10:11 pm
  • Hi list Would someone be so kind as to share some light on this for me. I have the following code: ($fileName) = ($_ =~ /regexcode/o); Which gives me the correct data. But if I make it like so (note ...
    Brent ClarkBrent Clark
    Jul 21, 2005 at 12:59 pm
    Jul 21, 2005 at 8:58 pm
  • Hi, I need to store a list of month names into a hash structure such that: $self- {monate}- {1}- {bezeichnung} = 'Januar' $self- {monate}- {2}- {bezeichnung} = 'Februar' etc. Until now, I have used ...
    Jan EdenJan Eden
    Jul 21, 2005 at 3:22 pm
    Jul 21, 2005 at 5:17 pm
  • Afternoon all, I was thinking about writing a perl script which would add users to an .htaccess file. How would I invoke htpasswd from a perl script? I'm thinking I'll need to use the system command. ...
    Graeme McLarenGraeme McLaren
    Jul 20, 2005 at 1:12 pm
    Jul 21, 2005 at 3:07 pm
  • Hi list I was hoping someone would be so kind as to help me with this. I have a CSV file and on every line, I have a line like so: lts.dat|somedata lts001.dat|somemoredata I basically would like to ...
    Brent ClarkBrent Clark
    Jul 21, 2005 at 9:10 am
    Jul 21, 2005 at 1:30 pm
  • Hi, I need to create a program which reads a file from the LAN, and that file is continuously updated (kind of log). The file increases continuously, and it can become very big. On every read, I need ...
    Octavian RasnitaOctavian Rasnita
    Jul 15, 2005 at 9:48 am
    Jul 20, 2005 at 3:03 pm
  • I can get date but not time. use Time::localtime; $tm = localtime; printf("Current date: %04d-%02d-%02d\n",$tm- year+1900,($tm- mon)+1, $tm- mday); printf("Current time: %02d:%02d:%02d\n",$tm- ...
    Dave AdamsDave Adams
    Jul 19, 2005 at 8:07 pm
    Jul 20, 2005 at 10:01 am
  • Hi: I want to write a code storing in "memory" a list of numerical values and then asking the user to guess a number, if that number matches one in memory, program should exit; otherwise keep ...
    Vineet PandeVineet Pande
    Jul 16, 2005 at 3:38 pm
    Jul 18, 2005 at 3:58 pm
  • command line: $perl man.pl manish perl script #!/usr/bin/perl; ($inputfile) = @ARGS; Could anyone tell me how to accept the commandline parametes this does not seem to work. Regards, Manish U
    Manish UskaikarManish Uskaikar
    Jul 14, 2005 at 4:07 pm
    Jul 14, 2005 at 5:17 pm
  • Hey Everybody, Just a simple question. How do I get the PID of my running perl script. I would like to have it in my perlscript so I can write it to a .pid file. Thanks guys, Mads - -- Mads N. ...
    Mads N. VestergaardMads N. Vestergaard
    Jul 11, 2005 at 9:05 pm
    Jul 12, 2005 at 11:30 pm
  • perl on HP-UX doesn't include the strict.pm into the core modules list? Can't locate strict.pm in @INC (@INC contains: /opt/perl5/lib/5.00502/PA-RISC1.1 /opt/perl5/lib/5.00502 ...
    Ken KillerKen Killer
    Jul 11, 2005 at 8:39 am
    Jul 12, 2005 at 12:38 am
  • Hey, I am making an IRC bot to bridge 2 channels on different networks. For this I need to scan 2 sockets for data. How do I do this? This is how I do 1 socket: while(my $input = <$sock ) { ......... ...
    Dave W TurnerDave W Turner
    Jul 6, 2005 at 4:24 pm
    Jul 10, 2005 at 5:49 am
  • Hi, How to find out the modules included in perl? Thanks, -Muthu
    MuthukumarMuthukumar
    Jul 6, 2005 at 11:49 am
    Jul 6, 2005 at 8:01 pm
  • Hello List, I have a file with multiple lines. I want to read only the first line. and a particular word in that line. For eg: File.txt apple,grape,orange,banana some other lines continued. So I want ...
    Umesh T GUmesh T G
    Jul 29, 2005 at 10:17 am
    Aug 1, 2005 at 10:13 am
  • I'm stuck.... I need an extra pair of eyes. I have an object that uses MIME::Parser to create a MIME::Entity from a message string. I have a test script that loads the message string and passes it to ...
    Tom AllisonTom Allison
    Jul 31, 2005 at 1:30 am
    Jul 31, 2005 at 11:20 am
  • Hey Guys I am having an odd problem using grep to ensure an array only contains distinct entries. I have a list similar to the following in a file (short example of a much longer list) ...
    Jason_normandinJason_normandin
    Jul 29, 2005 at 3:03 pm
    Jul 29, 2005 at 10:58 pm
Group Navigation
period‹ prev | Jul 2005 | next ›
Group Overview
groupbeginners @
categoriesperl
discussions186
posts716
users153
websiteperl.org

153 users for July 2005

Jeff 'japhy' Pinyan: 60 posts John W. Krahn: 39 posts Wiggins d'Anconia: 38 posts Tom Allison: 29 posts Chris Devers: 23 posts Scott R. Godin: 21 posts Xavier Noria: 18 posts Ing. Branislav Gerzo: 16 posts Dave Adams: 12 posts Jan Eden: 12 posts Arjun Mallik: 11 posts Jay Savage: 11 posts JupiterHost.Net: 11 posts Bob Showalter: 10 posts Brent Clark: 10 posts Charles K. Clarkson: 10 posts John Doe: 10 posts Moon, John: 10 posts Bryan R Harris: 9 posts Octavian Rasnita: 9 posts
show more
Archives