Accessing array from Perl DBI using Template Toolkit

2010-08-09 Thread me @
, using arrays ($sth-fetchrow_array). If this were to use array reference, can someone show some codes to me so that i may check it out and try to understand. Thanks in advance, Edward.

HELPPPPPPPPPPPPPP

2008-07-27 Thread THE WORLDS GOIN TO FAST FOR ME
please help me,this is what i put ,tell me what im doin wrong Restricted Directory or URL: http://www.googlepages.com Authentication URL: http://www.googlepages.com Authentication method: POST Parameters: AttributeValue i put .. full name

Re: changing the group that files are created with

2006-09-18 Thread Jack Faley ( Who's going to take me serious without a laser pointer?)
On 9/18/06, Ken Foskey [EMAIL PROTECTED] wrote: I have a lot of files created by a (much too) complex script and the user I am running with has a default group of 'staff' but I want all files created to have clientgrp which we create to ensure that only authorised people have access to a

Re: File::find with no_chdir

2006-09-18 Thread Jack Faley ( Who's going to take me serious without a laser pointer?)
On 9/18/06, Emilio Casbas [EMAIL PROTECTED] wrote: Hi, I have this script; --- use File::Find; $File::Find::no_chdir = 0; find(\wanted, @ARGV); sub wanted { print $File::Find::name\n if(-d); } --- I want to do a directory search for a given ARG, but no a recursive

There isn't Close FH

2005-11-15 Thread It's from me !
In book located at http://learn.perl.org/library/beginning_perl/3145_Chap06.pdf wich is about Chapter 6: Files and Data isn't mentioned about Close which is for closing those opened files. Thought this might be usefull to notice you about this. __

Regex problems

2004-08-23 Thread me
Hello all, I have been beating my head against the wall for a while trying to extract some data. Here is the following data: SNIP === Data 1: data1 Data 2: data2 Data 3: data3 Data 4: data4 Data 5: data5 data5 data5 data5 data5 data5 data5 data5 data5 data5 data5 data5

Re: regex help

2002-04-02 Thread Me
date manipulation a lot easier. if you know any, just let me know. Perl's got a huge community supported module library called cpan. For more info, enter at a command prompt: perl -q cpan As this doc will tell you, there's a search.cpan.org. With it you can easily browse/search the entire

Linux Commands in perl

2001-11-01 Thread me
Whats the trick in running linux commands under perl? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Linux Commands in perl

2001-11-01 Thread me
Thanks! Richie Crews [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... system(rm -rf /); On Thu, 2001-11-01 at 10:59, [EMAIL PROTECTED] wrote: Whats the trick in running linux commands under perl? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Linux Commands in perl

2001-11-01 Thread me
I know I wasnt about to run that one :) Chris Spurgeon [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Yow! Just a quick note to the differently clued, you really don't want to run that example. Maybe do something like system(ls -lt /); instead.

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread me
? CGI.pm ? That is probably causing the problem because your html seems right Etienne Bogus email wrote: Sorry bout that... I do mean select drop-downs from HTML. What I want to do is have it email me all the info, which it does email me. Everything but the dropd

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread me
ogus email wrote: Sorry bout that... I do mean select drop-downs from HTML. What I want to do is have it email me all the info, which it does email me. Everything but the dropdown menu information. see attached. Thanks again... Mike

[NEWBIE-Question] Processing Menus

2001-10-31 Thread me
Hello all, I am trying to process a menu option but for some reason perl causes the value to come up blank can anyone help? This is only hapening on the menu items. Is there a trick to sending drop down menus? TNX, Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: $a = $b eq ? 1 : 0;

2001-10-30 Thread Me
$allowed = $username eq 'admin' ? 1 : 0; $allowed = 1 if $username eq 'admin'; FWIW, that statement by itself has no relationship to mod_perl. Well, I think the point is that mod_perl doesn't reset the value of variables between runs so the second line may not do what the programmer

Re: Can i able to access the C function from Perl.

2001-09-25 Thread Me
Subject: Can i able to access the C function from Perl. owtdi: http://search.cpan.org/doc/INGY/Inline-0.43/C/C.pod -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Security Mechanisms with Perl/Apache on an Hosted Website???

2001-09-25 Thread Me
fmteyewtka remote authentication: http://library.smc.edu/rpa.htm Hey folks, I'm trying to cobble together some form of authentication mechanism on a website I am building for a friend. His ISP uses Perl Apache (it's on a linux box). I (obviously) don't have root priviledges and have limited

Re: Selective Joining of Two Array Elements

2001-09-25 Thread Me
I have this list I've read into an array line by line: tty 81 bcain Async 01:18:35 00:02:55 tty 83 dnguyenAsync 00:20:27 00:01:13 tty 85 cmandeville \ Async 03:26:22 00:00:58 tty 88 twootenAsync

Re: Continuing a while loop

2001-09-20 Thread Me
I need the code below to execute the sub double_check($host) but I still want the while loop to continue exactly what it's doing. Is this possible with Perl|? while (1) { $p = Net::Ping-new(icmp, 4, 2); #Ping object. Uses icmp protocal foreach $host (sort keys (%host)) {

Re: Perl one-liner problem

2001-09-08 Thread Me
[on list] On Apache Unix, this just hangs and does nothing and I have to do control d to kill it! perl -wpi.org -e s@/cgi-bin/forum_idx.pl@/fakecgi/fakeforum_idx.pl@ It doesn't hang, it's waiting for input. Other notes: 1. A backup file given .org as its extension? Weird. Most people use

Re: Perl one-liner problem

2001-09-07 Thread Me
Any idea why this aint working? perl -wpi.org -e s@/cgi-bin/forum_idx.pl@/fakecgi/fakeforum_idx.pl@ no quotes around the string to be evaluated (the s@...@...@ bit). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: source code !

2001-09-07 Thread Me
$array[112]='a'; but there isnot any array with this name.why? 1. perhaps the programmer made a mistake. execute perl with -w to find out more. 2. the array name is @array. are you sure there isn't an @array? 3. you merely have to mention a variable or element of an array or hash, and it

Re: Where are the printf function formatting options / rules?

2001-09-02 Thread Me
print formatted text. I have been unable to find a comprehensive list of formatting options for use with this function. Does anyone have a link to one? Also, how do I access the perl manpages from the command line. perldoc -f sprintf perldoc perl hth -- To unsubscribe, e-mail: [EMAIL

Re: How to count the number of whitespaces at the start of a line

2001-08-20 Thread Me
count only the number of spaces at the START of the line OWTDI: $_ = ' test '; /^( *)/; # the parens capture the match into $1 print length $1; --- In case you are interested, you tried: my $i = () = $str =~ /^\s/; This would print 0 or 1,

Re: Problem with open(....?) ....??

2001-08-19 Thread Me
I have a script that has to traverse a path to get to a file to open it. I do not own that file but the permissions are set to 644, so I should be able to open it with my script. When I run the script with the web browser, I get No such file or directory. The web server runs CGIs as a

Re: untainting passwords

2001-08-19 Thread Me
Hi, can someone tell me the proper syntax for untainting a UNIX password? First, just in case there is any confusion, I don't believe there is anything special about passwords in the context of tainting. if ($password_T =~ /( )/) {$password = $1;} else {$password=' ';} What goes

Create html extract from plain text file (was Re: How can i read out data from a file ?)

2001-08-09 Thread Me
I´d like to know how i can read out data from a file with for example, a newsletter, like 1.) first news 2.) 2nd news 3.)... and print it out as html ? How do i only print sentence no.2 ? First, some questions about what you already know. Do you know: Basic perl? Basic HTML? How

Re: getting the calling function name.

2001-08-07 Thread Me
caller only gives only the name of current sub You didn't read the docs carefully enough... caller($calldepth) perldoc -f caller -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: getting the calling function name.

2001-08-07 Thread Me
the current sub) Also, Be aware that the optimizer might have optimized call frames away before `caller' had a chance to get the information. hth with regards Rajeev Rumale - Original Message - From: Me [EMAIL PROTECTED] To: Rajeev Rumale [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent

Re: getting the calling function name.

2001-08-06 Thread Me
perldoc -f caller perldoc Carp.pm http://search.cpan.org/search?mode=modulequery=assert Hello Every Body, I need some help. I am using a sub routine to log all the messages to be used for debugging purpose. ie. debugLogger($debug_message); Since very similare kind of messages are genrated

Re: split problem

2001-08-05 Thread Me
What's the problem with my split? $line = "var=value"; ($var, $value) = split(/\s*[=]\s*/, $line); Looks fine to me. I experienced that $var and $value contained the first letter of the var and the value. Sometimes nothing. Where is the error? Looks to me like it must

Re: Insecure, dependant and tainted:(

2001-08-04 Thread Me
Insecure, dependant and tainted:( Heh. Perl can be a bit brutal at times... if ( open( FD, $Globals::DATA/$site/$Globals::REFTALLY )) { #**Error occurs here (on open)*** if ( open( FD, $Globals::DATA/$site/$Globals::REFTALLY )) { Insecure dependency in

Re: (MORE INFO) loose matching with regex

2001-07-28 Thread Me
Like I said I know I can use the module Similarity. But in order to do this I would need bot the query and the subject string. And to get the subject string I would need to 'slide' down the larger string and pull out all combinations 1 by 1. This is very slow with a 4.5 million character

Re: (MORE INFO) loose matching with regex

2001-07-28 Thread Me
search for 'efghmnop' in 'abcdefghijklmnopqrstuvwxyzabcdefghmnop' Take the last letter of the searched for substring, p. Pick a possible substring endpoint in the large string. This starts out at an offset from the beginning of the large string. The offset is the length of the

Re: deleting lines

2001-07-27 Thread Me
I would like too delete the 2nd, 3rd, 4, and 5 lines of a file. how can i do ? Try this at a shell prompt: perl -ni.bak -e '$. =~ /[2-5]/ or print' FILENAME -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Passing a class to subs

2001-07-05 Thread Me
First: Can't modify subroutine entry in character translation at ...ESEC_VALIDATE.pm line 31, near tr /[a-z]/[A-Z]/; The matching line is: $q-params('company') =~ tr/[a-z]/[A-Z]/; This line attempts to change the thing on the left hand side, and perl doesn't see the thing on the

Re: Match range of array elements?

2001-07-05 Thread Me
I don't know why the shorter version isn't working for you. I know the basic code fragment itself is fine. I notice that your shorter version has four dashes rather than the five in the longer version. Is that it? Other than that, I suggest you use the debugger or just pile in prints to see

Re: RE:regular expression

2001-07-05 Thread Me
Hi, I have the following string into a file: LOG_INFO : cpcdos23.col.bsf.alcatel.fr: read request for /bootp/popo.txt: success. And I have this code: my ($f)=@_; $thistime=(stat($f))[9]; return if ($thistime == $mtime); $mtime=$thistime; my $dummy; open (FILE, $f) || warn Couldn't

Re: Match range of array elements?

2001-07-04 Thread Me
if ($printLine[$state..3] =~ /^/) 1. The syntax $foo[] signifies a single element of array @foo. The . bit is in scalar context and should evaluate to a *single* *numeric* value. Hence the complaint: Argument isn't numeric in array element 2. When you use a variable that

Re: How is this doing what I want it too?

2001-06-30 Thread Me
[note: for some reason, your perl script came through (at least on my email client) as an attachment. if you can stop that happening, that would be nice.] - for ($i=0; $b[$i] != undef; $i++) != is a numeric comparison. Line 1544 of list is: #stopped at 867 and in perl's

Re: Inheritance of package global variables

2001-06-29 Thread Me
[inherited attributes] [get/set accessor methods] [regex validation of set] [better way?] I'm not sure about there being a *better* way, but I'm sure there are a lot of *other* ways. Various thoughts... Perl has the concept of tied data items. The basic operations on those data items, like

Re: Problem with hash value

2001-06-29 Thread Me
sub card{ my %card_map; my ($num)=@_; @card_map{1..9}= qw(one two three four five six seven eight nine); You are putting the numbers 0..9 in the array @card_map here, not in the hash %cardmap. No he isn't. (He's using a hash slice, which is fine.) I would think you are always

Re: Problem with hash value

2001-06-29 Thread Me
I would think you are always getting 'one', right? That's because: my ($num) = @_; puts the length of @_ in $num. Sorry, I'm being an idiot. You were doing the right thing. $ more number 3 5 $test10.pl number ``rd bard Hmm. print card of $_ is: card($_), \n;

Re: Clear screen

2001-06-28 Thread Me
I used this instruction to clear the screen on NT system(cls); print Hello; the same instruction is not working on unix. I modified the instruction to system(clear); print hello; This works fine on unix. Is there any instruction in perl to perfom clear screen and it

Re: Content-type

2001-06-28 Thread Me
Im using Content-Type TEXT/PLAIN charset=US-ASCII I think you're missing a colon, and you possibly have other syntax errors. Check on the net for the syntax of the Content-type line.

Re: Windows Background Process

2001-06-27 Thread Me
I need to start an external program from my perl script. This program will need to run in the background so my script can continue doing other things. It also still needs to notify the program when it terminates. I would appreciate any help on how I would do this. My environment is

Re: FW: rmdir

2001-06-27 Thread Me
PC chdir /u131/tmp or die $!; PC opendir(HERE, '.'); PC @AllFiles = readdir(HERE); PC foreach $Name (@AllFiles) { PCif (-f $Name) {next} PCif ((-d $Name) and ($Name =~ /^[A-Z]+$/)) {rmdir $Name} PCif ((-d $Name)) {print $Name\n} PC} It's

Re: Wanted: Explanation of array slices used in hash creation

2001-06-27 Thread Me
@$hashref{@array}; One thing I remember finding useful in understanding this sort of stuff is that the sigils (@, $, etc.) are more binding (have a higher precedence, as it were), than subscript parens. So you deal with them first. So @ followed by other sigils is going to end up with a bunch

Re: subroutine as search string?

2001-06-27 Thread Me
s/// and friends first parse their contents as double quoted strings, before ever considering the content as a regex. So you can do: $foo = '[a-'; $bar = 'z]'; s/$foo$bar//gi; and it will work (stripping letters). Furthermore, you don't need any dynamic behavior for the search

Re: substr (help,help,help);

2001-06-27 Thread Me
while (SOURCE){ if (m/\/nic\/login/){ this just says yes or no, you have a match or you don't. m// (and friends like s///) can do more than that for you. for one thing, they can grab a particular piece of what they match. substr ($_,28,4); what substr normally does -- get or change a

Re: How can I set return codes for a perl-script?

2001-06-27 Thread Me
I want a perl-script to be startet by another application. Is there a possibility to send a return code from the perl-script to the application saying whether the perl-script was running properly? Is this working for Unix and NT? use exit, eg exit 2;

Re: Variable scope

2001-06-26 Thread Me
, then that would explain the problem. Let me know if this was the case, and we can go on from there.

Re: Variable scoop

2001-06-26 Thread Me
I don't know why it was not working earlier when emailLog = 'logs/email_log'; was out of the sub block. Did you use a 'package' command anywhere?

Re: use of $_

2001-06-26 Thread Me
What actually sets the default variable? All sorts. Totally ad hoc. Be prepared to check and learn what does or doesn't set and use it, or realize that it can be changed on you by something else. When you know what you are doing, you may find localizing $_ useful, but it would be remiss of me

Re: Debugging the CGI - Application

2001-06-26 Thread Me
be greatfull if any one can give me better solutions for this. Perhaps CGI::Carp. use CGI::Carp qw(warningsToBrowser); carp Boohoo; warningsToBrowser(1); http://search.cpan.org/

Re: Debugging the CGI - Application

2001-06-26 Thread Me
Any more suggestion ? If you are allowed to modify your web server's setup, then: http://www.masonhq.com/docs/manual/Mason.html and prepare for your world to be turned upside down...

Re: compiled/interpreted??

2001-06-26 Thread Me
[is perl compiled or interpreted?] yes. Can anyone explain this in detail??? chapter 18 of 3rd edition of Programming Perl.

Re: Help please (any one)

2001-06-25 Thread Me
1. If we are after field 15, how comes you used field 14 in your answer please! *if ($fields[14] =~ /M/)*** The Nth element of an array is offset N-1. So $foo[0] is the first element, $foo[1] is the second and so on. This is a common practice in computing

Re: to copy a file (with perl)

2001-06-25 Thread Me
Hw could I copy a file in Perl use File::Copy; copy($file1, $file2);

Re: Exceptions ( catching and handeling).

2001-06-25 Thread Me
On Mon, Jun 25, 2001 at 12:12:19AM -0500, Me wrote: $done=false; while( $done eq false ) { eval { .. . read form files. process info... write back to files }; ( $@ ) ? ($done=false) : ($done

Re: removing ASCII characters from array

2001-06-25 Thread Me
But that wasnt the question man =) you print '230107312001,32,192,239' but the question was to just have: '32,192,239' -10 cookie points! ;-) Oops, being careless. You could throw away .*?= first: $_ = Sat Jun 23 01:07:31 2001,bytes=32,time=192ms,TTL=239; s/.*?=//g;# remove

Re: removing ASCII characters from array

2001-06-25 Thread Me
s/.*?=//g;# remove leading junk should of course be s/.*?=//;# remove leading junk Ok, ok, I accept another -10 points. : ;

Re: Regexp question

2001-06-25 Thread Me
[matching web page links] [using regexes] Don't use regexes. They aren't the right tools for the task. Use one of the cpan modules for parsing web pages. Some are written specifically for pulling out links. http://search.cpan.org/

Re: Regexp question

2001-06-25 Thread Me
Drats - just when I got the regexp worked out too... $_=~ m/(A)(.*?)( \/A)/ Kudos for working out the regex that works given your assumptions. If the web pages you will be parsing are known to be constrained to the assumptions you've established, then you're done. But be aware that your

Re: Re: Failed in package programme, how do I use package and object?

2001-06-24 Thread Me
().$a; you give me: print $c-displaysub().$ct::a; What is $ct? I'm afraid that it is an err in keyboard. Oops, I meant pt. $pt::a means $a in package pt. And when I use the following line in pt.pm our $a; system send me a terminated message,my system is Win98+Apache1.3.6 for win32+perl5

Re: Help for a newbie..

2001-06-24 Thread Me
im a newbie to PERL.. right now, im learning it but i dont have any exercises to work on. i need them because its how i learn.. can please someone tell me what is a nice thing to do when you are still starting to learn PERL and you want to enhance your skill tnx http://learn.perl.org

Re: Filehandles

2001-06-23 Thread Me
I want STDOUT to be sent to a FILESHANDLE. I have a script writing output DISPLAY..But I wanna this to be going into a file through FILEHANDLES .. Ur Help is Highly APPRECIATED Well I'll SEE if I can HELP YOU. open(STDOUT, foo) or die can't redirect STDOUT: $!; HOPE THIS HELPS.

Re: Failed in package programme, how do I use package and object?

2001-06-23 Thread Me
I'm try my best And you had 99% of it right. package pt; use 5.; $a=ok; #for public using $b=It's; # I don't know why put the newsubroutine in this package, # perhaps, it is a constructer, I copy from PERL's manual, # but it seem don't do anything. Most of what you wrote is

Re: Failed in package programme, how do I use package and object?

2001-06-23 Thread Me
Good job I decided to write this as two posts. Most of what you wrote is redundant in this particular case. You could have written: (I was just refering to the constructor, btw.) package foo; sub bar { bless \$qux }; . . package waldo; $emerson = foo-new; That

Re: Format Reports

2001-06-22 Thread Me
Hi Is there a module out there that will help me format data coming from an Access Database. Win32::OLE looks a bit daunting though I'm sure it will allow the typographic variety I'm looking for. That's too vague. Basically, please explain your constraints. If there are none

Re: LWP modules

2001-06-22 Thread Me
there are some forms which execute a javascript on their SUBMIT button and the on executing them from my script it gives me an error that javascript is not supported like http, ftp or other protocols. Is the word javascript anywhere in your perl script? Do you mean the action= parameter

Re: HTTP::Status status_message($rc) LWP::Simple

2001-06-22 Thread Me
Do you mean use the result from such a call, or how to do such a call? I'm guessing doing the call, and a somewhat wild guess is: HTTP::Status::status_message($rc) Assuming $rc has been set to something You may need to do a: use HTTP::Status; or similar, before you make the call.

Re: GDBM_File

2001-06-22 Thread Me
use GDBM_File; works OK what did your tie statement look like?

tutorial on my/our/use/package/local

2001-06-21 Thread Me
There's plenty of existing doc, but in the name of TMTOWTDI... Asbestos suit donned. Criticisms welcome. -- If you are wondering about things like: use strict; my $foo; our $bar; local $baz; explicit package then this article might be of help. --

Re: Re:MANPAGE

2001-06-21 Thread Me
How do I get access to the manpages please Depends on the system, and you may not be able to get access. One normal access method is to enter, at a shell prompt (command line): man foo to access the man page for foo. Perl has its own equivalent of manpages. To start, enter at a shell

Re: PROGRAM!

2001-06-21 Thread Me
/*/; for (my $i = -1; $i -9; --$i) { print $fields[$i] . \n; } } Q IS this what you want me to change it to for (my $i = 0; $i -3; $i -7) { Nope. This form of a for loop works like this: for (start; test; change) { do something

Re: file size

2001-06-21 Thread Me
-s as in: perl -e 'print $_: . -s . \n for (glob (*.*))' Hi, I would like to know if with a perl script you can get the size of a file ? I need to get all the size of 250 files on 250 computers ... thanx

Re: RTF to HTML or text conversion

2001-06-21 Thread Me
http://search.cpan.org/ Im trying to write a perl script that will pull newspaper stories out of a sybase database and post them on the web. I can connect to sybase, pull stories, but they are in Rich Text Format. I would like to convert the RTF to text or html. Could anyone point me

Re: use of require causing name space problems?

2001-06-21 Thread Me
Ok, I entirely retract my post to which this is a reply. Hey, I've been up all night. If the scripts are running as separate processes, then, well, I don't know. Does anyone know why perl behaves like this? [see earlier posts in thread]

Re: tutorial on my/our/use/package/local

2001-06-21 Thread Me
Brutal critique enclosed... beware, I get right to the point. :) Hmm, I enjoyed it, so I'm thinking I must be more SM oriented than I thought... Me # $_ is in main. $_ is always in main, even if the current package is something else. Yes. I spent some time considering where

Re: Can someone help me???

2001-06-21 Thread Me
@$foo{bar} What you intend by the above is the scalar value in $foo{bar} dereferenced as an array by the @. But that's not what happens. To achieve what you want, use: @{$foo{bar}} The issue here is precedence of sigils (@, $, etc.) versus subscript parens ({}, []), and the meaning of

Re: FW: PROGRAM!

2001-06-21 Thread Me
I have made a attachment in word There really is no good reason to resort to attachments for this list. As it happens, it looks like the attachment failed to come through anyway. Perhaps the list software rejects attachments. Anyhow, marking things with stars was fine. they are suppose to

Re: trying to convert characters into numbers based on a table

2001-06-20 Thread Me
According to my email client, this just arrived on the list: From: Cohan, Drew [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 16, 2001 2:20 PM Subject: trying to convert characters into numbers based on a table It's contents are just slightly different to the one that was also

Re: Extracting data from a web page

2001-06-20 Thread Me
Randal Well I'm not Randal, but I'm going to answer anyway... Would the same be possible for generating dynamic queries of web pages like amazon. The points Randal made were: 1. Yahoo has URLs that return CSV files. These are not web pages though the protocol is http. The perl

Re: problem of require

2001-06-20 Thread Me
Stick a: 1; at the end of the require'd file. I got a message when I run the perl script, I never got this msg before, is there anyone can tell me why? How can I fix it? rplcstr.pl did not return a true value at replacestr.pl line 6 Tips: on line 6, statement is require(rplcstr.pl

Re: Recursive subrutines

2001-06-20 Thread Me
[recursive procedure not localizing array passed as parameter] --- buildBranch(@someNodes); sub buildBranch() { @numNodes = @_; Use my @numNodes. my declares a new private variable each time it is encountered. Without it, @numNodes is the same variable each time the procedure gets

Re: Can you someone help me please

2001-06-20 Thread Me
Hi All, I have been asked to transform this bit of PERL coding into plain english, Can someone help me please. Regards, Elaine. Before anyone attempts an answer, are you a programmer? Do you know what, say, parameters are? # Exit code for the ccount form sub form_ccount_exit

Re: PERL PROGRAM HELP!

2001-06-20 Thread Me
and about another 5, which I need to get rid off! Can any body please suggest how do this task or what I need to read up on (topics e.g. Report writing etc) or any other tutorials on report writing or, any thing to show me how to get certain data from a file please

Re: move folder?

2001-06-20 Thread Me
Is there a Perl way to move a folder with out doing it one file at a time? (Similar to M$ Windows Explorer where you can drag a folder to another folder?) In some cases: rename $Old $New; will work. In some cases, system (mv $Old $New); will work. There's a bit more detail in:

Re: PROGRAM!

2001-06-20 Thread Me
[plz keep everthing on list unless there's a particularly good reason to go off list] (I need the three data types that are'underlined' and are in 'font size 14 large' That sort of formatting doesn't work on this list. (Btw, what you are calling 'data types' are really data items.

Re: Sorting

2001-06-19 Thread Me
Could someone tell me how to sort these files? As you can see they are already sorted in perl, but the problem is .7 is suppose to be before 10. to get this sort i used @list_of_files=sort @list_of_files; sorted EMX-1.15.0.17.37-EMX-1.15.0.17.36.dlcwrap sorted EMX-1.15.1.42.10-EMX

Re: Quick Perl Question

2001-06-19 Thread Me
($year, $month, $mday, $hour, $minute, $second, $timezone) = /^Rates as of (\d+).(\d+).(\d+) (\d+):(\d+):(\d+) (\w+) (.*)$/; The following code is pointless: $year = $1; $month = $2; $mday = $3; $hour = $4; $minute = $5;

Re: Extracting data from a web page

2001-06-19 Thread Me
Microsoft Excel has the ability to import data via a web query. If I create a query and run it on the following URL, a table with stock price information will be displayed on an Excel worksheet. http://finance.yahoo.com/q?s=%5EIXIC+%5EDJI+RHAT++d=v1 Now to the Perl/CGI question. What

Re: scope

2001-06-19 Thread Me
If I define a function just in the freespace of a file and have included in that file two packages which are bracketed in like: sub function {} package 1; {} package 2; {} How do I access the function (make a function call) from within one of the packages? is it main::function or

Re: Extracting data from a web page

2001-06-19 Thread Me
[how to do it in ten seconds] Randal just wants to take all the fun (and work) out of creating solutions.

Re: Quick Perl Question

2001-06-19 Thread Me
printf OUTFILE %s\,%s\,%s\,%s\,%s\,%s\,%s\n, $date, $time, $tz, $cur_sym, $cur_desc, $usd_unit, $units_usd; close(INFILE); close(OUTFILE); print STDERR \n; 1; You seem to be misunderstanding one particular aspect of perl. Given the following: while (INFILE) { # do something

Re: Quick Perl Question

2001-06-19 Thread Me
The second loop is executing. The TEST statement worked. Ok. The Currency part of the email has a fixed format that is never deviated from: 1-3 $cur_sym 4 space 5-32 $cur_desc 33-35 (3) spaces 36-55 d8.d10 (.00) 56-58 (3) spaces 59-78 d8.d10 (.00)

Re: Quick Perl Question

2001-06-19 Thread Me
Got a combination that sort of works. It returns all the required fields but truncates any line where $usd_unit or $units_usd has more than 1 digit before the decimal point. There can be as many as (8) digits before and (10) digits after the decimal point in both cases. Here's the regex

Re: Searching and printing a text file

2001-06-19 Thread Me
while(logfile) { #if(#line I'm currently on is m/$searchstring/i) { print; } Now the problem is, how do I specify The line I'm currently working on? That's easy -- you don't. When you said: print; you didn't specify what to

Re: Please suggest a better method...

2001-06-18 Thread Me
tr{abcdefghijklmnoprstuvwxy} {222333444555666777888999}; or, for a smidgen extra legibility: tr{abc def ghi jkl mno prs tuv wxy} {222 333 444 555 666 777 888 999};

Fw: map function has me confused

2001-06-18 Thread Me
that this localizing doesn't apply to all { }. To summarize Jos' email to me, this should say something more like because the $_ is in map's {}, it's implicitly localised. True, and another example of Perl just doing the right thing; Perl generally localizes when you'd want it to anyway

  1   2   >