FAQ

Search Discussions

446 discussions - 1,568 posts

  • hi, how do i reset a foreach loop so that it starts at the top each time? a sample of my code looks like: foreach $zrec (@file) # file with agent and city { chomp($zrec); foreach $zkey (@template) # ...
    James LumJames Lum
    Dec 20, 2001 at 9:06 pm
    Dec 21, 2001 at 8:21 pm
  • Hi Guys I am running into an issue trying to determine whether a file exists when the name varies. The file has a name that always begins with "vista90n" and so I tried the following code ... if (-e ...
    Khan, SajidKhan, Sajid
    Dec 18, 2001 at 3:39 pm
    Dec 27, 2001 at 12:42 am
  • Is there a document in perldoc that tells the best way to get the last line of a file? Below is my usual code for reading a file. #!/usr/bin/perl -w $file = qq(/some/file/); open FILE, "$file" or die ...
    James KeltyJames Kelty
    Dec 18, 2001 at 6:25 pm
    Dec 19, 2001 at 4:18 am
  • Hi I need to add a word to the end of a word inside a file. HELP PLEASE for example: I will read a file with these names july tony richard then I want to add the following to the name @minime.com. So ...
    Peter LemusPeter Lemus
    Dec 31, 2001 at 9:44 pm
    Jan 2, 2002 at 12:29 pm
  • HI! Studying 'Learning Perl, 3rd edition' I was stopped, suddenly, by C. 8's Exercise 1, using the pattern_test program. the following works fine: #!/usr/bin/perl -w while (< alfred ) { if (/fred/) { ...
    Egor BrandtEgor Brandt
    Dec 19, 2001 at 8:58 pm
    Dec 20, 2001 at 7:57 pm
  • Hello All, I want to transform a sorted list into a compact list (if this is the correct term). e.g. my list is 9,11,12,13,14,23,25,26,27,50 and want to have something like 9,11-14,23,25-27,50 (to ...
    Kredler StefanKredler Stefan
    Dec 17, 2001 at 12:19 pm
    Dec 18, 2001 at 10:05 am
  • I'm curious to know if someone could point me in the right direction to find out how to manipulate the /etc/passwd file and/or the /etc/shadow file. I know about getpwent, getpwnam, getpwuid, but ...
    Joshua ColsonJoshua Colson
    Dec 11, 2001 at 8:25 pm
    Dec 13, 2001 at 10:44 am
  • Hi Folks! Trying to get todays date and month... was able to find this... #snip-start use Time::localtime; $tm = localtime; ($DAY, $MONTH, $YEAR) = ($tm- mday, $tm- mon, $tm- year); #snip-end this ...
    Shinagare, SandeepShinagare, Sandeep
    Dec 5, 2001 at 4:26 pm
    Dec 6, 2001 at 1:28 pm
  • To the PERL community, I downloaded the file ActivePerl-5.6.1.630-MSWin32-x86 and installed it on my computer (Windows 98, P3). to test a batch client for BLAST application in molecular biology which ...
    FJMFJM
    Dec 14, 2001 at 5:43 pm
    Feb 18, 2002 at 11:26 am
  • Hello people... Happy Holidays... This is my first post. Im a senior high school student and about to graduate this year(lets just hope hehhehe).. Im just wondering if any of you can recommend some ...
    LukeLuke
    Dec 27, 2001 at 8:57 am
    Jan 4, 2002 at 11:10 pm
  • hi can anyone tell me how to short this... if($searchstring =~ /A/i or $searchstring =~ /B/i or $searchstring =~ /C/i or $searchstring =~ /D/i or $searchstring =~ /E/i or $searchstring =~ /F/i or ...
    Jesus Is Not DeadJesus Is Not Dead
    Dec 7, 2001 at 9:16 pm
    Dec 8, 2001 at 4:13 am
  • I have what seems to be a persistent problem with all files that I import from dos into emacs. I have those control M's all over the place. Does anyone know of a perl script to 'clean' these files? ...
    Booher Timothy B 1stLt AFRL/MNACBooher Timothy B 1stLt AFRL/MNAC
    Dec 5, 2001 at 10:32 pm
    Dec 7, 2001 at 8:54 am
  • o.k. another regex issue . . . I want a one-liner that can remove everything after a given character: i.e. in this case everything after ! (fortran comment): would this work: perl -npe 's/\!.+$//' my ...
    Booher Timothy B 1stLt AFRL/MNACBooher Timothy B 1stLt AFRL/MNAC
    Dec 12, 2001 at 7:58 pm
    Dec 21, 2001 at 1:11 am
  • right now i do w | head -1 and get what's below my signature. I want to clean that up, cutting it after the # of users, so that everything after AND including the third comma is removed from that ...
    KeN ClarKKeN ClarK
    Dec 20, 2001 at 4:03 am
    Dec 20, 2001 at 11:09 pm
  • Hi, I was just wondering, can I send data through the parallel port using perl? And If yes, how ? With some kind of a module ? And where can I read more about it? Thanks for any help provided :))
    Stanislav ZaharievStanislav Zahariev
    Dec 20, 2001 at 6:54 am
    Dec 20, 2001 at 4:02 pm
  • Hi all, Need a little help on summarising 2 different tables into 1, based on a particular field. The 2 tables (they are actually content from a log file) look like the follow : Table #1 ------------ ...
    PerlPerl
    Dec 14, 2001 at 2:43 am
    Dec 15, 2001 at 3:09 pm
  • hi dear team... why do you use always "mysql" and not "postgres" ?? thx for your time. Best regards. Nafiseh Saberi www.iraninfocenter.net www.sorna.net Beaty is in the eye of the beholder. ...
    Nafiseh saberiNafiseh saberi
    Dec 6, 2001 at 11:27 am
    Dec 11, 2001 at 4:39 am
  • Hi there, This is both frustrating and embarrassing. I can't capture the following data into a variable. The line I want is: <DL.COD GIAZUC00</DL.COD I have tried a multitude of Regex, none seems to ...
    Dermot PaikkosDermot Paikkos
    Dec 5, 2001 at 12:32 pm
    Dec 5, 2001 at 6:49 pm
  • How I can know in that I number of line finds a word in a text file?. For example, a file "file.txt" contains the following list: Chocolate Cake Cheese Apple orange melon lemon How I can know in that ...
    Mark McloganMark Mclogan
    Dec 28, 2001 at 9:37 pm
    Dec 30, 2001 at 2:31 am
  • -----BEGIN PGP SIGNED MESSAGE----- Hello all, I'm writing a common gateway interface that will call I need to issue several shell commands. (cp, cd, and cd .., and maybe others). Any assistance would ...
    Mark-Nathaniel WeismanMark-Nathaniel Weisman
    Dec 23, 2001 at 6:43 am
    Dec 26, 2001 at 10:59 pm
  • Hi all, I am new here. But I need to ask what I hope is a relatively easy question. I am writing a script that checks a password that someone enters. I have what can be allowed in the password in and ...
    Batchelor, ScottBatchelor, Scott
    Dec 20, 2001 at 7:41 pm
    Dec 21, 2001 at 10:13 am
  • I need to know the fastest way to determine a length of an array. I know there is a built in kind of thing somewhere. I just cant remember it. Thanks
    Ryan GuyRyan Guy
    Dec 17, 2001 at 8:22 pm
    Dec 19, 2001 at 12:41 am
  • I'd appreciate it if someone could help me wrap my brain around this one. I've got a string like this: $string='"one two" three "four five six"'; I'd like to wind up with an array like this: one two ...
    Pete EmersonPete Emerson
    Dec 12, 2001 at 2:09 pm
    Dec 13, 2001 at 1:32 pm
  • Hello, I have been using Perl for some time but have not yet used the Perl modules. I wanted to start off with the HTML::Template module - it will save me a lot of effort if I can use it. I need to ...
    Sharat HegdeSharat Hegde
    Dec 7, 2001 at 6:45 am
    Dec 10, 2001 at 7:10 am
  • Is there a quick, simple command I can use to disable Modperl on all variables in script, without having to qw' then all? Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com
    Agustin RiveraAgustin Rivera
    Dec 7, 2001 at 11:30 pm
    Dec 8, 2001 at 7:21 pm
  • Hi List, I am new to perl and looking for a shortcut way of doing this. # $letter could be any letter from A to L. if ( $letter eq "A" || $letter "B" || $letter "C" || $letter eq "D" ............ || ...
    Nguyen, AndyNguyen, Andy
    Dec 5, 2001 at 7:17 pm
    Dec 5, 2001 at 8:20 pm
  • Hi, I am transfering xyz.txt file from windows98 to linux server manually. $r_file = "xyz.txt" ; then in perl script i am executing `chmod 0777 $r_file` ; # $r_file is in the same directory as is ...
    Rahul GargRahul Garg
    Dec 4, 2001 at 12:39 pm
    Dec 4, 2001 at 4:12 pm
  • Hi All, I used to use Expect http://expect.nist.gov/ for dealing with interactive programs i.e. Telnet and FTP. Expect lets you interact with running process as if it was a file. Does Perl have ...
    Ahmed MoustafaAhmed Moustafa
    Dec 4, 2001 at 3:38 am
    Dec 4, 2001 at 3:06 pm
  • Does anyone know how to get a script to execute at a predefined time without user interaction. I would like to monitor my sys clock and have the perl script execute. Thanks Jeff
    JeffJeff
    Dec 28, 2001 at 4:41 pm
    Dec 29, 2001 at 4:26 pm
  • Hello, I need to delete an element from a list (array). The delete function does not seem to work. For example if I need to delete element number "i" from the list "myList", then the code delete ...
    Sharat HegdeSharat Hegde
    Dec 21, 2001 at 9:36 am
    Dec 21, 2001 at 9:57 pm
  • here is a snip of code that opens a .csv file, massages some of the data a bit, and then writes it back to a new .csv file. The problem is that I can't figure a quick way to print out with commas ...
    Scott LutzScott Lutz
    Dec 17, 2001 at 8:05 pm
    Dec 19, 2001 at 10:58 am
  • Hi, I'm trying to get my ascii, hex, and decimal values straight. I wanted to print out all values from 0 - 256. It works , but I'm getting unexplained (as of yet) "corruption" in the alignment of ...
    ZentaraZentara
    Dec 15, 2001 at 2:22 am
    Dec 19, 2001 at 12:48 am
  • Hello, Want to make sure I'm not missing anything here. My task is to see if a file looks like it's encrypted. I'm splitting the path/filename/extension via File::Basename and checking to see if the ...
    Ray MurphyRay Murphy
    Dec 6, 2001 at 5:06 pm
    Dec 7, 2001 at 3:07 am
  • Hey all, Please don't stree to much over this one but, is there an easier way of writing this? while(1){ if ($status == 1) { #Do this sub... sub(); elsif ($status == 1) { #Do this other sub... ...
    Daniel FalkenbergDaniel Falkenberg
    Dec 5, 2001 at 4:50 am
    Dec 5, 2001 at 2:27 pm
  • I would like to replace all double with single quotes inside a html tag, i.e. perform the substitution only for html tag attributes, but not outside tag boundaries. my $string = qq|<a ...
    Birgit kellnerBirgit kellner
    Dec 30, 2001 at 10:34 am
    Jan 7, 2002 at 1:34 pm
  • Connie ChanConnie Chan
    Dec 30, 2001 at 5:48 pm
    Dec 31, 2001 at 10:02 am
  • Hi. I am trying two items in a script: - I have to read a file and when I find certain word I must change it for other one. - I have to read a file and when I find certain word I must delete it from ...
    Jose VicenteJose Vicente
    Dec 20, 2001 at 3:24 pm
    Dec 29, 2001 at 10:36 am
  • Below is a hash array... %hash('james' = '1', 'kelty' = '2', 'brian' = '3'); This is my normal structure for a hash array, but I was wondering if it was possible to have multiple values for a key? ...
    James KeltyJames Kelty
    Dec 28, 2001 at 10:20 pm
    Dec 29, 2001 at 9:39 am
  • GlacierI am using the GD:Graph for plotting the graphs. These graphs are generated on the fly and displayed on a wab browser. I need to put some explaintion of the graphs beside it. Can anybody know ...
    Pankaj WaradePankaj Warade
    Dec 19, 2001 at 8:55 pm
    Dec 27, 2001 at 11:10 pm
  • I have installed Active Perl on top of the regular Perl and now the @INC is not pointing to the right directories anymore. Is there a config file I can modify to fix that? Thanks a lot, Pierre
    Pierre CarettePierre Carette
    Dec 21, 2001 at 12:04 am
    Dec 21, 2001 at 8:42 pm
  • Does anyone know how to send an HTML formatted email using sendmail. I can send plain text email OK. If I format the message using HTML the message shows the HTML tags. I can't find any information ...
    JeffJeff
    Dec 17, 2001 at 5:44 pm
    Dec 19, 2001 at 4:04 am
  • Every time any of you place a dollar sign ($) in the subject line, it gets tossed into the deleted file here. This is due to the vast amount of spam being sent over the Internet. I dare say there are ...
    WayneWayne
    Dec 18, 2001 at 11:03 pm
    Dec 19, 2001 at 12:42 am
  • Hello all, Could some one help me with the following code? Basically the code works OK except for the fact that the user $new_user (s) home dir is not created? #!/usr/bin/perl -w use ...
    Daniel FalkenbergDaniel Falkenberg
    Dec 14, 2001 at 1:35 am
    Dec 14, 2001 at 6:25 pm
  • If anyone knows where I can find some half way decent examples and explanations I would be thrilled thanks.
    Ryan GuyRyan Guy
    Dec 13, 2001 at 8:23 pm
    Dec 13, 2001 at 10:08 pm
  • Howdy: Where can i find documentation about using email addresses in perl scripts? I believe this has to do with regex, but I'd like to read it for myself. Not finding much but flames at the FAQ ...
    Johnson, ShaunnJohnson, Shaunn
    Dec 12, 2001 at 3:22 pm
    Dec 13, 2001 at 12:41 pm
  • Hi, I'm guessing this has been asked before, but is there a way to tell which modules you have installed? My system guys are picky about new ones, so I would like to know what we already have... -Pat
    Patrick GriffinPatrick Griffin
    Dec 11, 2001 at 6:47 pm
    Dec 12, 2001 at 8:06 pm
  • Hello, I have a wizard kind of form processing - basically 5 forms with user inputs in all the forms. The data is captured and stored at the end of the form processing. The data collected from the ...
    Sharat HegdeSharat Hegde
    Dec 12, 2001 at 4:38 am
    Dec 12, 2001 at 5:36 pm
  • I have a set of timestamps, which are seconds since midnight. say, 36000 36001 36002 ..... I'd like to convert them into the format: 10:00:00 10:00:01 ..... Can I do this using Date::Manip, failing, ...
    Tirthankar C. PatnaikTirthankar C. Patnaik
    Dec 5, 2001 at 8:48 am
    Dec 5, 2001 at 2:03 pm
  • I'm sure this is a dumb question. It seems like one anyways. Is there a move command in perl? I know I can copy then unlink a file but I cant find a move (or similar) command. -Michael
    Michael McQuarrieMichael McQuarrie
    Dec 31, 2001 at 3:51 pm
    Dec 31, 2001 at 5:07 pm
  • Hi to all! I'm just starting Perl, since... a few hours ago... I have a text files to analyze. Each line looks like : "a", "bcd, efg, h", "c" I found that $l=readline($filehandle) gives me the ...
    Jean-LouisJean-Louis
    Dec 29, 2001 at 6:59 pm
    Dec 30, 2001 at 2:12 am
Group Navigation
period‹ prev | Dec 2001 | next ›
Group Overview
groupbeginners @
categoriesperl
discussions446
posts1,568
users354
websiteperl.org

354 users for December 2001

John W. Krahn: 69 posts Curtis Poe: 53 posts Jeff 'japhy' Pinyan: 46 posts Bob Showalter: 39 posts Brett W. McCoy: 36 posts Michael Fowler: 36 posts Daniel Falkenberg: 35 posts Jenda Krynicky: 35 posts Andrea Holstein: 34 posts Etienne Marcotte: 34 posts Michael R. Wolf: 33 posts Hanson, Robert: 27 posts Lance Prais: 24 posts Wagner-David: 24 posts Daniel Gardner: 23 posts Leon: 22 posts Maxim Berlin: 22 posts A. Rivera: 21 posts Nafiseh saberi: 21 posts Jonathan E. Paton: 18 posts
show more
Archives