FAQ

# Perl>beginners>August 2003

## 337 discussions - 1,351 posts

• 22

#### Cron jobs and perl

Can someone tell me how to go about running a cron job with perl? Here's what I have thus far: 1) I have a cron job: 04 09 * * 1-7 /cygdrive/c/Documents\ and\ ...
 Trina EspinozaAug 16, 2003 at 4:16 pmAug 29, 2003 at 10:11 pm
• 21

#### how do i list the methods connected to a object?

hi i wonder how i can list all the methods availible from a given object? martin
 Martin A. HansenAug 5, 2003 at 10:21 amAug 7, 2003 at 8:36 pm
• 18

Howdy, I read in an earlier email that some people put in front of variables/function/etc to show that they are "important and should be handled by the program only" and it said that some "modules ...
 Dan MueyAug 13, 2003 at 6:38 pmAug 15, 2003 at 4:51 pm
• 15

#### exists and defined--not just for hashes anymore

Just a quick tip, which the docs mention that 'exists' and 'defined' will let you know if a particular element of a hash exists, or is defined, they work on arrays just as well. (I didn't know that, ...
 Paul ArcherAug 26, 2003 at 8:30 pmSep 5, 2003 at 6:17 am
• 15

#### Temp variable

hi, The statement ($a,$b) = ($b ,$a); is swapping without a third variable. But looking at a lower level , it is storing a temporary variable in the registers. How can i get that temporary ...
 Ryan10975073Aug 23, 2003 at 5:08 pmSep 4, 2003 at 4:25 am
• 14

#### rearrange text

Hello, I am a relatively new PERL beginner and have been trying to work with simple bioinformatics stuff. I have so far written some very useful but simple bioinformatics scripts. However.... ...
 Mike RobesonAug 24, 2003 at 7:26 pmAug 31, 2003 at 4:10 pm
• 14

#### pronunciation guide

Does anyone know of a pronunciation guide for the special variables and such in Perl? I came up empty on Google. I've been learning Perl by reading and doing, but I haven't talked to anyone ...
 Paul ArcherAug 25, 2003 at 12:07 pmAug 26, 2003 at 3:58 pm
• 14

#### Still need unlink help!! God help me.

Still having problem with unlink. My original problem began with deleting files from a list. I seem to have fixed the problem reading the list but the unlink does not work. Here is the test script ...
 PerlwannabeAug 9, 2003 at 12:01 amAug 12, 2003 at 4:43 am
• 12

I am writing a script that relies on retrieving the $ENV{REMOTE_ADDR} from the user's browser. I'm depending on this for database information retrieval rather than cookies or some type of ...  Ron GoralAug 12, 2003 at 6:58 pmAug 13, 2003 at 6:26 pm • 11 #### Length() is bits/bytes or neither I know that the number returned by the length function is the number of characters. With ascii text is that the bits or bytes also? If not is there a function similar to length() that tells you the ...  Dan MueyAug 26, 2003 at 3:56 pmAug 29, 2003 at 4:11 am • 11 #### Perl Codes Written in Windows Env I have a perl script that I developped in a windows machine and it had to be transfered by ftp to a UNIX server. The codes worked fine when I tested them on my windows machine. Is it true that the ...  MmbodjiAug 25, 2003 at 8:42 pmAug 28, 2003 at 2:23 pm • 11 #### the File::Copy module I was just reading the File::Copy module. Now on a pure Win32 environment will this work copy("\\machine1\share\file1","\\machine2\share\file2"); Or should I do something else???????  Saadat SaeedAug 19, 2003 at 3:20 pmAug 21, 2003 at 9:33 pm • 11 #### Case conversions Any one have or know of a function to convert ugly "NAME, USER" to "User Name"? TIA Scott.  Scott TaylorAug 15, 2003 at 9:18 pmAug 18, 2003 at 2:52 pm • 10 #### grep with ftp Howdy: I'm looking for information that will let me open an ftp connection and grep / search for files and then FTP them back to me. I saw something about FTP and macros, but the other articles about ...  Johnson, ShaunnAug 28, 2003 at 2:35 pmSep 12, 2003 at 6:52 am • 10 #### need help decompose word Hi, I have no idea how to do this. I have a name Anthony Bob I want to put each letter in an array (no space) for(0..$numbersofletters){ @letters[c]= A LETTER } so when i do print @letters i get A N ...
 AwardsAug 18, 2003 at 3:29 pmAug 29, 2003 at 8:13 pm
• 10

I want to make the case of the first letter of all the words in a selected string to upper case. The code s/\b(\w+)/\u$1\E/g; enables me to do this for the whole document. But the string I want to ...  BisAug 22, 2003 at 1:17 pmAug 26, 2003 at 4:28 pm • 10 #### quick re help Hi everyone I am pretty new to regex's, so I was happy when my text wrapping expression worked - for the most part. It messes up when I need to wrap lines with \n that don't end in a space. If there ...  WebmasterAug 13, 2003 at 4:34 pmAug 15, 2003 at 2:51 am • 9 #### Mod_Perl2 CGI.pm Is mod_perl a replacement for CGI? If just getting involved with perl and the web (Not new to perl) what is the better option mod_perl or cgi? This is on an apache server. I choose mason thinking it ...  Paul KrausAug 29, 2003 at 5:44 pmSep 17, 2003 at 12:51 pm • 9 #### Please don't say RTFM Dear Gentle Readers, Please be gentle with me as this is only my first day trying to learn perl. I am using an online tutorial, however it must be written for *nix and I am trying to use it on win32. ...  Robert Mark WhiteAug 16, 2003 at 5:44 amAug 17, 2003 at 5:58 pm • 9 #### our vs my Anybody know what version of Perl our was introduced? I'm using our in a module and want like to use 5.6.0; or whatever version in that module so that I can make sure the our's aren't a problem. ...  Dan MueyAug 12, 2003 at 8:00 pmAug 14, 2003 at 4:12 pm • 9 #### use lib problem Hi, I have a problem maybe it is normal. My problem is with using lib now to retrieve my module i do this use lib "/path/to/Module"; it works just fine but created a configuration file. with$dir = ...
 AwarsdAug 2, 2003 at 2:01 pmAug 2, 2003 at 8:26 pm
• 8

#### -w vs. use warnings

Hello everyone, Having been a Perl programmer for several years now I have become accustom to using the following as my normal "start" of any Perl script: #!/usr/bin/perl use warnings; use strict; ...
 K OldAug 28, 2003 at 8:15 pmSep 1, 2003 at 2:55 pm
• 8

#### compare date,time

Hi, I have the following 12/08/2003, 11:00 13/08/2003, 23:00 Now I would like to compare them and then calculate the how long time was elapsed in terms of hours. For the example above it will return ...
 AwardsAug 11, 2003 at 6:23 pmAug 27, 2003 at 6:06 pm
• 8

#### California ballot sort algorithm?

Here's a sure sign of someone with too much time on his hands: I was curious how to implement an algorithm in perl to sort the candidates in California's recall ballot. According to the news, here's ...
 KEVIN ZEMBOWERAug 14, 2003 at 1:16 pmAug 15, 2003 at 2:07 pm
• 8

#### Ok I am tired

Hi All, I am really tired now: -------------------------------------- package Foo; use strict; use LWP::UserAgent; sub new { return bless {},shift; } sub Foo::INC { my ($self,$filename) = @_; my ...
 Gupta, SharadAug 9, 2003 at 5:49 amAug 11, 2003 at 12:05 am
• 8

#### Simple question

Hi, How do I divide a variable in an array ? Lets say element one need to be divided by 1000? $line[1] =$line[1]/1000; Thanks, Henrik
 Sommer, HenrikAug 5, 2003 at 3:13 pmAug 9, 2003 at 4:00 am
• 7

#### document creation.

Lo all, I want to create large number of documents (mainly invoices) using perl. In a couple of months, I should be creating a few hundred documents per month with a few million records in total for ...
 Chris KnipeAug 9, 2003 at 9:05 pmSep 2, 2003 at 9:09 am
• 7

#### Graphing/Plotting over time

Hello all, Just wanted to look into a "for fun" project, after a recent project that wasn't much fun at all... Our organization got hit by the blaster worm, which hit many, many windows boxes. The ...
 Akens, AnthonyAug 27, 2003 at 8:19 pmAug 29, 2003 at 3:52 pm
• 7

#### DBI.pm

Home PC using XP Prof. SP1 with Oracle 9.2 DB installed. PERL5.005.03.exe installed. I am new to the world of PERL. I have searched my PC and DBI.pm has not been installed on my PC. I understand that ...
 KENNETH JANUSZAug 8, 2003 at 3:46 pmAug 29, 2003 at 3:42 pm
• 7

#### Blob to JPEG

Hello all, I have a database with JPEGs stored in a blob field and I want to display them on an HTML web page with out creating a new file.jpg for each connection. I'm currently hunting on Google, ...
 Scott TaylorAug 27, 2003 at 6:32 pmAug 27, 2003 at 10:16 pm
• 7

#### trouble with math... driving me nuts.

Luckily I was easily able to recreate the problem. See code below: print 37.75 - 33.67 - 4.08 ; <STDIN ; I find these things all the time. Is there a particular module I can use to fix these things? ...
 Peter_farrarAug 21, 2003 at 7:10 pmAug 22, 2003 at 7:39 pm
• 7

#### Executable perl program help!!

How can i generate such a file?
 Sc00170Aug 20, 2003 at 2:08 pmAug 21, 2003 at 3:40 am
• 7

Hi, all -- If I have a string like my $string = "Hello, #NAME_FIRST# #NAME_LAST# from #STATE#!" ; and I want to replace those chunks each with another string, what is a good way to approach that? I'd ...  David T-GAug 17, 2003 at 12:26 pmAug 17, 2003 at 8:59 pm • 7 #### Download Beginning Perl ebook I've posted the ebook Beginning Perl for downloading at: <A HREF="http://websiteprogrammin.com/wsp/docs/Beginning_Perl.zip" http://websiteprogrammin.com/wsp/docs/Beginning_Perl.zip</A  MotherofperlsAug 13, 2003 at 8:15 pmAug 14, 2003 at 12:11 pm • 7 #### Global variables and a forked process Does a forked process share the memory locations of the global variables from the parent process? Thanks in advance!  Ahmed MoustafaAug 9, 2003 at 8:05 pmAug 11, 2003 at 2:12 pm • 7 #### Splitting a path Hi, I have a path which may look like: UNIX: --------- PATH=/usr/local/share:/usr/local:... Where each path is seperated by ":". Windows: ------------------ PATH=E:\foo:D:\bar Again the path ...  Gupta, SharadAug 2, 2003 at 10:02 pmAug 4, 2003 at 9:20 pm • 6 #### writing back to a file Hi, Newbie here. I am writing a program that takes a file that has two columns of words, extracts the second column, then saves the original file with only the data in the first column. Question #1 - ...  Absolut NewbieAug 20, 2003 at 1:12 pmAug 31, 2003 at 6:56 pm • 6 #### why this is not working ?? Hi all : I am running a process "n" number of times with a for loop. I am interested in looking for the status at specific intervals(say at every 10 iterations). I wrote the below shown code for this ...  T.S.Ravi ShankarAug 27, 2003 at 5:41 amAug 28, 2003 at 9:30 pm • 6 #### returning proper info from subroutines Howdy: I have a script where I want to * connect to database * create a subroutine where it executes and returns the value of the SQL * pass that value to another area to check and IF statement * ...  Johnson, ShaunnAug 27, 2003 at 2:52 pmAug 27, 2003 at 10:05 pm • 6 #### multiple regex in if() staetment Howdy all: I'm trying to figure out the best way to test a string agains a list of regexs like so: my @regex = qw(qr(joe$) qr(^mama) qr([abc])); if($string does not match any of the regexs in @regex) ...  Dan MueyAug 19, 2003 at 11:06 pmAug 25, 2003 at 4:05 pm • 6 #### Read dir / sort I have a program that would read a directory and then do some renaming. Up until recently it always seem to read by oldest file first to newest. Which is great because my renaming involves ...  Paul KrausAug 22, 2003 at 6:31 pmAug 23, 2003 at 11:23 am • 6 #### passing hashes to subs Hi, all -- I've gotten rusty and so I'm back again as a rank amateur :-) I have a script that will make a database connection, pull out some rows, repeatedly generate personalized message bodies, and ...  David T-GAug 17, 2003 at 11:15 amAug 17, 2003 at 7:28 pm • 6 #### ERRNO ... What am I missing Can someone explain the interaction of POSIX ERRNO and PERL scripts? When does ERRNO get set and is it set with each PERL call? I cant seem to track when '$!' is set. Sometimes it will be set to 0, ...
 Allison, Jason (JALLISON)Aug 7, 2003 at 5:43 pmAug 12, 2003 at 1:53 pm
• 6

#### smtp problem

Hi, I found a strange problem. like the subject says i'm using Net::SMTP I don't have any error in my code. But when I'm using a server i.e mail.xxx.com Only domain @xxx.com will receive an e-mail. ...
 AwardsAug 9, 2003 at 10:16 pmAug 10, 2003 at 5:17 pm
• 6

#### Regex Pattern

HI, I am trying to use regex to extract the city,state and zip out of a file. Now, the problem is the city can have more then one word to it like San Antonio San Francisco etc, I have also, bumped ...
 Trevor MorrisonAug 8, 2003 at 12:06 amAug 9, 2003 at 1:58 pm
• 6

#### How to replace a text in a file

Hi, I am novice to Perl and learning very basic things. I want to replace a text in a file with new text. I want to do it programatically. How can I do that? I do not want to use Perl command line ...
 Vinay ThombreAug 5, 2003 at 10:00 amAug 8, 2003 at 4:57 pm
• 6

#### While loop on a file handle

Hi, I am trying to step through each line of a file that contains orders that were place through a internet shopping cart. I have this code: open(ORDER,$order) or die "Error opening \"$order\": ...
 Trevor MorrisonAug 5, 2003 at 5:42 pmAug 6, 2003 at 11:52 pm
• 6

#### List::Util / arrays

Hi, I am trying to get the maximum number in a file looking like: 1 5001 2 5002 3 5003 4 5004 5 5005 6 5006 7 5007 8 5008 9 5009 10 5010 11 5011 12 5012 13 5013 14 5014 15 5015 16 5016 17 5017 18 ...
 Jakob KofoedAug 5, 2003 at 10:52 pmAug 6, 2003 at 5:04 pm
• 6

#### how to do paging of records

can anyone help me on how to do paging of records i want a few records per page, im using oracle 8i.!!! and cgi. david
 Coello, DavidAug 6, 2003 at 12:40 pmAug 6, 2003 at 2:06 pm
• 6

#### input box

Hi I am trying a way to get input from user in GUI mode.. Like Inputbox in Visual Basic.....How do i go about? with regards D.P.S
 PANNEER SELVANAug 5, 2003 at 11:57 amAug 6, 2003 at 12:11 pm