Re: Regex for matching files that don't have type extensions

2016-11-05 Thread Aaron Wells
True. It could get hairy. Unicode is a pretty vast landscape, and I think if you only want ASCII word characters to count as things that could be in a filename, your original [A-Za-z0-9_] is your best bet. Thanks to the others for their comments. As Ken says: there are probably more ways to code th

Re: Regex for matching files that don't have type extensions

2016-11-05 Thread Aaron Wells
*predefined On Sat, Nov 5, 2016, 10:27 AM Aaron Wells wrote: > Hi Jovan. \w is a presidents character classes that is equivalent to > [A-Za-z0-9_], so this works also: > m/^\w+$/ > > On Sat, Nov 5, 2016, 10:24 AM Jovan Trujillo > wrote: > > Ah, I figured it out. >

Re: Regex for matching files that don't have type extensions

2016-11-05 Thread Aaron Wells
Hi Jovan. \w is a presidents character classes that is equivalent to [A-Za-z0-9_], so this works also: m/^\w+$/ On Sat, Nov 5, 2016, 10:24 AM Jovan Trujillo wrote: > Ah, I figured it out. > m/^[A-Za-z0-9_]+$/ works because it will only match if the entire string > follows the pattern. Thanks! >

Re: Data type of attributes

2016-09-29 Thread Aaron Wells
Hi Klaus, Have you tried this? ref $some_obj; # should give your class name as a string Doubtless Uri will find something wrong with this 😋 On Thu, Sep 29, 2016, 12:34 PM Klaus Jantzen wrote: > Hello, > > I have defined Moose-classes with various attributes. > > During the execution of a progr

Re: calculate within a loop

2016-09-12 Thread Aaron Wells
@Jim, That eval bit i think Nathalie got from me. I need to review my core Perl. I think i’m in the habit of assuming Perl warns against any usage of undefined values, even in boolean context. Not so. I’ve proven to myself that this is not the case: $ perl -E’ >my ($foo, $bar); # these aren’t

Re: calculate within a loop

2016-09-10 Thread Aaron Wells
Hi there, Me again. The sort function does NOT default to <=>. It defaults to string comparison order. See the Perl doc for sort: "If SUBNAME or BLOCK is omitted, sorts in standard string comparison order. " So assuming you want numbers sorting, 'sort { $a <=> $b } keys %{$nameref}' would be the

Re: This is one of the things ...

2016-05-14 Thread Aaron Wells
Ha. Java has one... but it's not very pretty. Just like anything Java, it's bloated, overly verbose, and clunky. Java just discovered "lambdas" a couple years ago with jdk 8. But functional languages have had lambda syntax for years. Ocaml: List.map((*) 2)[1;2;3;4;5] Haskell: map (2*)[1,2,3,4,5]

Re: This is one of the things ...

2016-05-12 Thread Aaron Wells
Thank you Lee. I had forgotten about that use case. I tried to do dibasic query building once upon a time with JavaScript before discovering the goodness of Perl. Ended up leaning on a library. It made things better, but it didn't make them Perl. On Thu, May 12, 2016, 5:06 PM lee wrote: > > ...

Re: How to navigate through a hash of hashes of arrays (?) to get to the first array entry

2016-04-14 Thread Aaron Wells
ginning-perl%2F3145_Chap07.pdf <https://docs.google.com/viewer?url=http://blob.perl.org/books/beginning-perl/3145_Chap07.pdf> Thanks and happy Perling! Aaron > On Apr 13, 2016, at 6:29 PM, Kenneth Wolcott wrote: > > Hi; > > I have the following output from Data:

Re: beginners Digest 9 Nov 2012 07:32:27 -0000 Issue 4441

2013-03-08 Thread Aaron Madden
Sent from my iPad On Nov 9, 2012, at 2:32 AM, beginners-digest-h...@perl.org wrote: > > > > > > > > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Comparing files with regular expressions

2008-05-05 Thread Aaron Rubinstein
> Given just the idea of the data, can you improve on that? I bet I could! It's interesting how my instinct, when trying to develop a programming solution, is to wrestle with the problem inside the context of the language. As a result, the solutions I come up with tend to be shaped by my limited

Re: Clear a hash

2008-01-18 Thread Aaron Priven
medical Research San Antonio, TX 78227 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ -- Aaron Priven, [EMAIL PROTECTED],com, http://www.priven.com/aaron

Re: Variable division, assignment and sprintf in one line

2007-11-28 Thread Aaron Priven
ariable_name = 100*1024*1024; print "$a_really_long_variable_name\n"; $_ = sprintf ("%.2f", (($_ /=1024) /=1024)) for $a_really_long_variable_name; print "$a_really_long_variable_name\n"; Both give the same output: 104857600 100.00 The latter is most useful if you

Re: dereferencing

2007-10-29 Thread Aaron Priven
e. And now I don't have to. Yay. -- Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: dereferencing

2007-10-29 Thread Aaron Priven
ething like Data::Alias, for example, might do the trick. -- Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

dereferencing

2007-10-29 Thread Aaron Priven
8 }; *hash = $hashref; print $hash{a}; that prints "5". But there's no way to do this with a lexical (my) variable. is this right? -- Aaron Priven, [EMAIL PROTECTED],com, http://www.priven.com/aaron

Re: Bad scoping? Bad prototyping?

2006-10-09 Thread Aaron Priven
On Oct 9, 2006, at 10:35 AM, Helliwell, Kim wrote: #!/bin/perl sub1("Hello, "); sub1("world\n"); sub sub2($str) { print $str; } sub sub1($str) { sub2($str) } Prototyping in perl does not do what you think it does. It does not turn your arguments into variables. All it does is

Re: Polluting the Global Namespace

2006-07-20 Thread Aaron Priven
See "perldoc Exporter". If you use @EXPORT instead of @EXPORT_OK, it will put those subroutines into the global namespace by default. On Jul 20, 2006, at 3:09 AM, Shane Calimlim wrote: I'd like to add some sub routines to the global namespace. I know this is usually considered bad design fo

Re: math formula substitution and evaluation

2006-07-15 Thread Aaron Priven
) { print "$test is true!\n"; } } Either way, using eval is potentially be a security issue since if these are user-supplied tests, then the user can run arbitrary code this way. Fine in some circumstances, bad in others. -- Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: how to add a list of numbers

2006-07-14 Thread Aaron Priven
is there any shortest way to add a list of random numbers ? for example : 11 1 250 39 100 , thanks -- ibiokid -- Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://l

Re: How to get the OS local/default drive using perl?

2006-07-13 Thread Aaron Priven
For a temporary file, you'd want to use the File::Temp module (see http://search.cpan.org/~tjenness/File-Temp-0.16/Temp.pm ). For a permanent file, such as a configuration file, you'd probably have to figure it out for each operating system, and then test $^O to figure out which operating s

Re: regex repetition

2006-07-12 Thread Aaron Priven
Check out the module Set::IntSpan and see if it does what you want. http://search.cpan.org/dist/Set-IntSpan/IntSpan.pm On Jul 12, 2006, at 3:08 PM, Ryan Moszynski wrote: I need to write some code to allow users to specify which of a whole bunch of elements(e.g.512/1024) that they want to view.

... is a valid filename

2006-07-10 Thread Aaron Priven
For what it's worth, "..." is indeed a valid filename. Back in Ancient Days of Yore, when I was a young undergrad at UC Santa Cruz playing on the open-access timeshare Unix system, we all had read access to each others' home directories, and it was somewhat common for people to put semi-sec

Re: passing by value vs. passing by reference

2006-07-04 Thread Aaron Priven
On Jul 4, 2006, at 10:46 AM, Aaron Priven wrote: you could pass it an expression that returns the value of $a. Sorry, I should have said "your variable" instead of "$a" here. -- Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron -- To unsubscribe, e-mail: [

Re: passing by value vs. passing by reference

2006-07-04 Thread Aaron Priven
variable, $dir, passed to it as an argument. The problem is that I need $dir intact (ie unchopped) after calling said subroutine, but it has been altered by the chop. -- Aaron Priven, [EMAIL PROTECTED], http://www.priven.com/aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Number of Items in Array

2005-04-18 Thread Aaron C. de Bruyn
been diging through the documentation and various websites for literally 6 hours now. I'm beginning to suspect I may be missing something extremely obvious (making myself look like an idiot) or that maybe it has something to do with the way Perl handles references...? Does anyone have a

pattern matching

2005-02-24 Thread Aaron Reist
Hello everyone, not quite sure if what I m trying to do is possible, but here is the basic idea: Currently I have a simple program takes a username from a html textbox and checks against a list of values in a notepad document. If the name is found the user is given access, if not they are prom

Re: Can't Compile BerkeleyDB on OS X with Perl 5.8.1

2003-10-27 Thread Aaron Davies
On Monday, October 27, 2003, at 09:43 AM, Bakken, Luke wrote: -Original Message- From: Aaron Davies [mailto:[EMAIL PROTECTED] I'm trying to install BerkeleyDB via CPAN on my OS X 10.2.6 box, but the make phase bombs almost immediately. I've put the error log at <http://bells

Can't Compile BerkeleyDB on OS X with Perl 5.8.1

2003-10-27 Thread Aaron Davies
I'm trying to install BerkeleyDB via CPAN on my OS X 10.2.6 box, but the make phase bombs almost immediately. I've put the error log at , since it's a little larger than I like to mail people. Can anyone give me a hand here? -- __

Re: perl program

2003-07-24 Thread Aaron Christopher Vonderhaar
There are ways around this that are much much uglier. Personal recommendation is to free the source. Aaron VonderHaar ([EMAIL PROTECTED]) > > I am newbie here. I want to know if the perl program code can be = > protected such that noone else sees it. In other words,I have several = > perl codes an

list syntax for backquote-like functionality

2003-07-23 Thread Aaron Christopher Vonderhaar
ide assortment of other special characters. $s = quotemeta "\`backquoted'string\` & \"killer bees'\""; print `echo $s` #=> `backquoted'string` & "killer bees'" Thanks for any help, Aaron VonderHaar ([EMAIL PROTECTED]) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

perl/tk compiling problem

2003-07-21 Thread aaron barclay
a dell Inpiron8200 with redhat. Any help at all would be greatly appreciated. I am sure I am missing something simple due to lack of experience. Thanks in advance. aaron. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Question about assigning a value to an array.

2002-10-18 Thread Aaron Petry
I have 2 files. One is an error log created from an import procedure to a database, the other is the text file that we were trying to import. The error log gives me back the line number that the record was on. I need to cross reference this. I'm thinking that this should be no big deal. I'l

Question about Mime::types

2002-10-02 Thread Aaron Petry
I 'm trying to make a program to handle mailing within our department. The program asks a bunch of questions about the message to be sent, reads the body for a text or html file, then looks up people's e-mail addresses in a database, and uses Net::SMTP to loop over the results of that

Re: VT100 Terminal and modem dialing

2002-05-03 Thread Aaron Petry
n, but the computer that I want to run this on is on a network. The piece of proprietary hardware is not. At 08:08 AM 5/3/2002 -0700, you wrote: >On Friday, May 3, 2002, at 07:37 , Aaron Petry wrote: > >> I need to connect to a remote computer via a dialup and send >> some t

VT100 Terminal and modem dialing

2002-05-03 Thread Aaron Petry
I need to connect to a remote computer via a dialup and send some terminal commands via a vt100 terminal. Is there a module to do this, and if so, what is it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

IF statements and timestamps

2002-03-08 Thread Aaron Shurts
nless', but that didn't work either. Thanks for the input. -_-Aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Forgive my n00biness

2002-03-01 Thread Aaron Shurts
ght, e-mail me and I will try to go into more detail. Thanks! Aaron Shurts -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: convert array to integer

2002-02-22 Thread Aaron Shurts
This may not be a better way, but another way is: my(@array) = (5, 6, 7, 8); my($integer) = sprintf("%1d%1d%1d%1d", @array[0], @array[1], @array[2], @array[3]); -_-Aaron -Original Message- From: Jon Molin [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 4:06 AM To

RE: How to issue CLEAR command from Perl

2002-02-21 Thread Aaron Shurts
If you don't already have it, invest some coin in the 3rd edition of 'Programming Perl'. -_-Aaron -Original Message- From: Hewlett Pickens [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 2:15 PM To: [EMAIL PROTECTED]; zPerl Beginners Subject: RE: How to issu

RE: How to issue CLEAR command from Perl

2002-02-21 Thread Aaron Shurts
Try typing this at the command line: $ perldoc -f system ;-) -_-Aaron -Original Message- From: Hewlett Pickens [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 11:26 AM To: zPerl Beginners Subject: How to issue CLEAR command from Perl Invoking a Perl script from a

RE: learning perl

2002-02-20 Thread Aaron Shurts
Post some sample code. Let's see what you are trying to do. -_-Aaron -Original Message- From: Dave [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 2:50 PM To: [EMAIL PROTECTED] Subject: learning perl I've installed ActivePerl 5.61 on Win2000, th

RE: Very Basic Help

2002-02-14 Thread Aaron Shurts
Also. I don't have much CGI experience, but couldn't you just nix all those print statements with, 'qq' or 'EOLN'? -_-Aaron -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 7:59 AM To: Hugh

RE: Help me out

2002-02-14 Thread Aaron Shurts
of book is from O'Reilly as well, "The Perl Cookbook". Noticing a pattern? =) The O'Reilly series is excellent and I have found a lot of useful information from this mailing list as well. -_-Aaron -Original Message- From: Victoria Elliott [mailto:[EMAIL PROTECTED]] Sent:

Writing to Multiple Files

2002-02-01 Thread Aaron White
Does anyone know the best way to write a really long form into two seperate flat files, which then can be polled using a generated ID# into HTML? Thanks Guys... -- /_/_/ Aaron K. White _/ _/ _/ _/ _/ GeSE Program Office _/_/_/ _/ _/ _/_/ _/ Web

Form to Flat File

2002-01-17 Thread Aaron White
Does anyone have a simple script that can handle about ten fields from a basic html form, that can be written to a flat file. -- /_/_/ Aaron K. White _/ _/ _/ _/ _/ Americas Mission Control _/_/_/ _/ _/ _/_/ _/ Web Administration & De

RE: Best perl on windows?

2002-01-03 Thread Aaron Shurts
array = `cat $filename` because cat doesn't exist on a Windows box. -_-Aaron -Original Message- From: coe smythe [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 11:17 AM To: [EMAIL PROTECTED] Subject: Best perl on windows? i recently moved and have not gotten my linux box b

log filtering & snmp

2001-12-21 Thread Aaron M. Hirsch
. critical, warning, ..., it needs to send an snmp packet to another host. Does anyone have any ideas on how I should go about starting this task? I've looked around abit to see if I am reinventing the wheel, but it doesn't appear so. Thanks in advance! -- Aaron M. Hirs

directing output

2001-12-19 Thread Aaron
be appericiated. Thanks! Aaron M. Hirsch SchlumbergerSema Systems Administrator 11146 Thompson Ave. Lenexa, KS 66219 Phone: (913) 312-4717 Mobile: (913) 208-9806 Fax: (913) 312-4701 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Getting rid of junk.

2001-12-13 Thread Aaron Shurts
Thanks ALL! I got it. -_-Aaron -Original Message- From: Etienne Marcotte [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 12:25 PM To: Aaron Shurts; [EMAIL PROTECTED] Subject: Re: Getting rid of junk. and while re-reading you post: why are you using while( ($login

Getting rid of junk.

2001-12-13 Thread Aaron Shurts
) = $sth->fetchrow_array ()) { foreach %login { get rid of the leading numbers; } } Aaron Shurts -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

PERL MySQL DBI

2001-12-06 Thread Aaron Shurts
be imported into Excel. Thanks in advance for the help. Aaron Shurts -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

PERL and MySQL

2001-12-05 Thread Aaron Shurts
just wondering if someone could help me out with a 20,000 feet view of things or point me to a good URL that explains PERL and MySQL joins and what-not. Thanks in advance for the info. Aaron Shurts -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Sending mail on a Win32 system.

2001-11-29 Thread Aaron Petry
I've seen all sorts of ways to send mail on a *nix system, but I can't find a good module to use with Win32. Does anyone have any suggestions on how to send an e-mail message on win32 systems? Mail::Sendmail doesn't seem to work. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

RE: [Perl-unix-users] Script Help Please

2001-11-26 Thread Steve Aaron
foreach (@lines){ chomp; if (/\bUP\b/ && /\b$server_name\b/) { s/\t+/|/g; s/missed //g; print "$_\n"; } close inlogfile; } } close listfile; close outlogfile; Thanks, Craig >>> Steve Aaron <[EMAI

RE: [Perl-unix-users] Script Help Please

2001-11-26 Thread Steve Aaron
here the server name falls then it will be more efficient to put the text that occurs least frequently on the left of the && as the right-hand side is only evaluated if the left-hand expression returns true. Steve Aaron -Original Message- From: Craig Sharp [mailto:[EMAIL

RE: Win32::Perms

2001-11-16 Thread Aaron Shurts
Again...I have no idea how to do this in PERL either. The best way I know how to do it, is to write a registry .inf and apply the changes with secedit. -_-aaron -Original Message- From: Veeraraju_Mareddi [mailto:[EMAIL PROTECTED]] Sent: Friday, November 16, 2001 2:45 AM To: [EMAIL

RE: registry Security permissions.

2001-11-16 Thread Aaron Shurts
You'll want to write a registry .inf file with the proper permissions for the key. You can then use secedit.exe to apply the proper changes to the keys. -_-Aaron -Original Message- From: Veeraraju_Mareddi [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 11:35 PM To: [

RE: IP accounting

2001-11-16 Thread Aaron Shurts
If it is DHCP, you are going to want to collect more than just the IP from the user. The IP is not uniquely identifiable in a DHCP situation. You may want to collect such info as the MAC address as well. Are you storing this in a flat file, or some kind of db? -_-Aaron -Original Message

Re: Comparing Arrays

2001-07-19 Thread Aaron Craig
At 15:21 19.07.2001 +0200, Diego Riaño wrote: >Hi everybody > >I have two array, like this > >@array1=(one, two, three); >@array2=(one,tww,three); > >Is there some way to compare the two arrays? >I was trying with the eq and ne operations inside an IF statement but i >does not work > >Could someon

Re: looking at rows in text files

2001-07-18 Thread Aaron Craig
How about: use strict; open(IN, "file.txt") || die("RRRGGGHHH $!"); while() # loop through file setting each line to $_ { chomp; # lose newline /^([^\s]+)\s/; # look for anything at the beginning of the string up to the first space or tab character and remembe

Re: getting first character of item

2001-07-13 Thread Aaron Craig
At 21:55 13.07.2001 +1000, Mal Beaton wrote: >I am stuck on the foreach loop getting the first character of $user > >foreach $user (keys %{users{abc}}){ >### trying to get the first character of $user here my $fc = substr($user, 0, 1); # $fc now contains the first character of $

Re: C & Perl for loops

2001-07-13 Thread Aaron Craig
How do I access each character in a string with Perl? TIA... check out perldoc perlfunc -- there's a whole section on built in string functions to get the length of a string use length (surprised?) my $sString = "foo bar"; print length($sString)."\n"; Aaron Craig Programming iSoftitler.com

Re: multiple entry/exit points

2001-07-12 Thread Aaron Craig
ny other language I happen to be writing in. I've seen a lot of code with 10's of embedded blocks, all with conditions that guide the flow to a final destination -- it's so ugly! What's wrong with putting all of your error checking at the top of your function, and then jumping out if you run into something you don't like. It makes the meat of the function easier to read. Aaron Craig Programming iSoftitler.com

RE: printf

2001-07-12 Thread Aaron Craig
At 09:52 12.07.2001 +0100, Govinderjit Dhinsa wrote: >Does any body know why the printf is not printing anything out! > >I tested the rest of the script by replacing the printf line with, >## >print "$line"; >## >the file prints (with out any changes to the file, as expected). So >

[OT] in my own defence (was RE: Is there an alternative to CGI ???)

2001-07-11 Thread Aaron Craig
A colleague just pointed out this link for me, and I may have accidentally gotten the correct definition for CGI in my generalization. At any rate, for those who are interested: http://cgi-spec.golux.com/draft-coar-cgi-v11-03-clean.html Aaron Craig Programming iSoftitler.com

RE: Is there an alternative to CGI ???

2001-07-11 Thread Aaron Craig
t -- apologies for the quick response. Aaron Craig Programming iSoftitler.com

Re: Is there an alternative to CGI ???

2001-07-11 Thread Aaron Craig
At 01:14 11.07.2001 -0800, Michael Fowler wrote: >On Wed, Jul 11, 2001 at 10:28:46AM +0200, Aaron Craig wrote: > > You may be confusing your terms here. CGI (Common Gateway Interface) is a > > general term that is used to describe the various methods used to > > commu

Re: Is there an alternative to CGI ???

2001-07-11 Thread Aaron Craig
e Internet has some >disadvantages, prominent is the increased use of memory. > > Is there another alternative for connecting Perl with the Internet >other than CGI (Like maybe using Perl with ASP!!!) > > >George Savio Pereira >^^^^ >Email : [EMAIL PROTECTED] Aaron Craig Programming iSoftitler.com

Re: Help: Searching an array question++

2001-07-10 Thread Aaron Craig
t the value contained in the variable $sFindGIF print ("$index: $_\n"); $s = $array[$index]; why do you create the variables and then not use them? Use $sFindGIF and $sSwapGIF here. $s =~ s/this.gif/that.gif/; close (TESTFILE); Aaron Craig Programming iSoftitler.com

RE: newbie whitespace question

2001-07-10 Thread Aaron Craig
(just in >case :) Before everyone jumps, the tabs/spaces foot in my mouth has already been pointed out to me. I won't even try to make an excuse...there is none :) Aaron Craig Programming iSoftitler.com

Re: PRELOADING IMAGES FOR A WEB SITE

2001-07-10 Thread Aaron Craig
ng with using JavaScript for doing the job it was created for -- that is, controlling dynamic content on a web page. My more involved pages often use a mix of Perl on the server, and JavaScript and C++ (in the form of a plug in) on the page. Just for kicks, I throw some Flash and ActionScri

RE: newbie whitespace question

2001-07-10 Thread Aaron Craig
^Kilobytes:(.*)$/ ) { > $var = $1 ; >} >} > >This will set $var to " 3452" for example, I want to strip out the >whitespace to only get "3452". > >Any thoughts appreciated, > >-Nat Aaron Craig Programming iSoftitler.com

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
At 04:29 09.07.2001 -0800, Michael Fowler wrote: >On Mon, Jul 09, 2001 at 01:59:28PM +0200, Aaron Craig wrote: > > You are correct -- I should have read the documention :) However, in > every > > day programming-speak, list and array get tossed about in such a way th

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
ven say that a list is an array that you can't mess with. Which brings up a question on my part. Are there any examples of the use of an array and the use of a list where labelling them differently make something different happen? IE foreach (0..9); # list, correct? foreach (@array); # array to the average programmer, how does calling 0..9 an array screw them up? Aaron Craig Programming iSoftitler.com

Re: remplace ...

2001-07-09 Thread Aaron Craig
ot;); # added error check open (OUT, "c:\\test\\test_output.txt") || die("Couldn't open c:\\test\\test_output.txt: $!"); while() { $_ =~ s/html/php/g; print OUT $_; } close TRANS; close OUT; now, you have a new file, test_output.txt, which contains the substituted text Aaron Craig Programming iSoftitler.com

Re: diff bet list and an array

2001-07-09 Thread Aaron Craig
At 16:30 09.07.2001 +0530, baby lakshmi wrote: >hi, >What is the difference between list and an array?? >May be this very small question. but i would like to know the difference. >The help in this regard is appreciated. >Thank you >Regards >babylakshmi There isn't one.

Re: R: download a file

2001-07-09 Thread Aaron Craig
>> > >>I need to be able to save to disk... > > >Why don't you just do > >print qq~http://my.host.com/name_of_file.xxx";>Shift-click to get > >file~; > >then? :-) Safest of all print qq~http://my.host.com/name_of_file.xxx";>Right-click and select "Save Target As..." to get file~; Aaron Craig Programming iSoftitler.com

Re: Loading a comma delimited file into a hash.

2001-07-07 Thread Aaron Craig
At 13:24 06.07.2001 -0400, Aaron Petry wrote: Oops. >>>chomp(@f1fname = ); >> >>I would do this: >>my $line = ; >>chomp $line; >>@f1fname = split(/,/, $line); >> >>and then some error checking: >> >>print "Field counts do not m

Re: download a file

2001-07-07 Thread Aaron Craig
And calling the script from the location bar is not very >usefull, since what I want is to have a list of all my files in my browser >window and simply be able to click on one to download it to my disk. > >Anyone can Help ? If you want more information to help just ask. > >Thank you very much for your time. > >Frédéric Fortin, >[EMAIL PROTECTED] >TPC Communications Aaron Craig Programming iSoftitler.com

Re: Loading a comma delimited file into a hash.

2001-07-06 Thread Aaron Petry
At 06:10 PM 7/6/2001 +0200, Aaron Craig replied to me: >>use strict; >> >>my($file1, $f1fnum, @f1fname, $f1namef, $f1key); >> >>#First, get the path of the file that has the names that need to be compared. >>#The first line prints the question, the secon

Re: Loading a comma delimited file into a hash.

2001-07-06 Thread Aaron Craig
At 11:53 06.07.2001 -0400, Aaron Petry wrote: > I have a comma delimited file like this: >"field1","field 2","Some longer field 3 here","And some field 4" >.I want to ask my users how many fields there are and populate that to a >scala

Loading a comma delimited file into a hash.

2001-07-06 Thread Aaron Petry
I have a comma delimited file like this: "field1","field 2","Some longer field 3 here","And some field 4" .I want to ask my users how many fields there are and populate that to a scalar, then ask them what the field titles are and shove that input into an array. Then I want to ask them

Re: NET::IRC

2001-07-06 Thread Aaron Craig
be changed to whatever server is hosting this connection -- and I'd be that Nick should be changed to a valid nickname. > my $conn = $irc->newconn(Nick => 'GH-[bot]', >Server => 'some.server.com', >Port => 6668); Aaron Craig Programming iSoftitler.com

Re: I did it!!!

2001-07-06 Thread Aaron Craig
At 08:31 06.07.2001 -0400, Jeff 'japhy' Pinyan wrote: >On Jul 6, Aaron Craig said: > > >print "The result,"; > >sleep(2); > >print " you ignorant fool,"; > >sleep(2); > >print " is: $result\n"; > >You'd

Re:Menu

2001-07-06 Thread Aaron Craig
ubroutines > >.. > >my $cc = $mnu1->cascade(-label=>'~Language'); > >$cc-> checkbutton (-label=>'Generic Alcatel', -variable => \$GENERIC); >$cc-> checkbutton (-label=>'French', -variable => \$FRENCH); > > >But now I have nothing displayed,neither Client ethernet adress nor Adresse >Ethernet du Client. > >Why ? Thanks Aaron Craig Programming iSoftitler.com

Re: How to print char '\' ?

2001-07-06 Thread Aaron Craig
line 2. > >How i may print that symbol ? Perl running on Linux console. Aaron Craig Programming iSoftitler.com

Re: I did it!!!

2001-07-06 Thread Aaron Craig
int "The result,"; sleep(2); print " you ignorant fool,"; sleep(2); print " is: $result\n"; Aaron Craig Programming iSoftitler.com

Re: Absolute Path

2001-07-06 Thread Aaron Craig
ip file in >a cgi script. > >Here's my code. > >while($i < ($#filelist)) >{ > if ((@filelist[$i] ne '.') && (@filelist[$i] ne '..')) > { > print " \"ftp\\public\\downloads\\assortedfiles\\@filelist[$i]\">@filelist[$i]"; > print "\n"; > } > $i++; >} Aaron Craig Programming iSoftitler.com

RE: \r

2001-07-05 Thread Aaron Craig
$fields[6] =~ s\r//; > > for (@fields) { print NEW "$_" } > } > close CSV; > close NEW; > exit; > > [End of file] > Aaron Craig Programming iSoftitler.com

Re: Loops - Killing of Process on Win2k.

2001-07-04 Thread Aaron Craig
encoolen, Email : >[EMAIL PROTECTED] >Bencoolen Street, Singapore - 189648 ICQ : 121001541 >Website : www.myangel.net >~~~ Aaron Craig Programming iSoftitler.com

Re: error

2001-07-04 Thread Aaron Craig
ou, and insist on using Windows "features", which you may or may not want. Aaron Craig Programming iSoftitler.com

RE: Editor

2001-07-04 Thread Aaron Craig
ide >which language is going to give us the most flexibility and power. You say that like you only want to learn one language :) I use a mixture of Perl and C++ for the guts of a program, and Visual Basic and JavaScript/HTML for the interface part, depending on where the program has to live. Aaron Craig Programming iSoftitler.com

Re: Windows2000

2001-07-03 Thread Aaron Craig
Extensions. > >They advised us to use our "Network Places" instead for file transfer. > >Does anyone know how we can tell our Windows2000 Professional Operating >system (Network Places) that it is moving a .pl or .cgi, ect file so that >we can be sure it does it in ASCII? > > > >Thanks, >RL > Aaron Craig Programming iSoftitler.com

Re: conversion Perl<->HTML

2001-07-02 Thread Aaron Craig
print "cols=\"50\">$texte"; : in the "textarea", there is "First line >\n Second Line" but I want: >First line >Second Line". > >But, if a write $texte="First line \n Second Line" before the HTML code, >the text is correct. > >How can I convert the text from the file to the "textarea"? > > >tks. > Aaron Craig Programming iSoftitler.com

Re: Web Page Interaction...

2001-06-29 Thread Aaron Craig
tion you can point me in.. > >Craig >[EMAIL PROTECTED] >Pager >Numeric: 1-877-895-3558 >Email pager: [EMAIL PROTECTED] >-- >You will never find time for anything. >If you want time, you must make it. > >Charles Buxton Aaron Craig Programming iSoftitler.com

Re: is this a structure of some kind?

2001-06-29 Thread Aaron Craig
ir ; > $session = $session_path[$#session_path] ; > print "\n Checking $session:" ; > > ALL_STUDIES: foreach $study (@studies) { > chomp $study; > $numfound = 0; > @hits = (); # new list > >-- > >the items in CAPS: are so

Re: confusing Perl idioms and practices

2001-06-29 Thread Aaron Craig
t's going on. Many will argue (correctly) that no decent programmer would name his or her variables $x and $y outside of a for loop. However, rejecting readability out of hand as catering to beginners leads to similar behavior. I always prefer an extra line of code in the spirit of readab

Re: Joining variables

2001-06-27 Thread Aaron Craig
32nd day of Confusion in the YOLD 3167 > > Wibble. > > > > > > > >or > >$newvar='';$newvar .= "$_-" foreach ($var1, $var2, $var3); chop $newvar; > >or > >$newvar = sprintf "%04d-%02d-%02d", $var1, $var2, $var3; > >or > >$newvar =~ s/.*/$var1-$var2-$var3/; > >I think I need a life. > >-- >Today is Pungenday, the 32nd day of Confusion in the YOLD 3167 >Kallisti! Aaron Craig Programming iSoftitler.com

Re: Converting Unix paths to windows

2001-06-27 Thread Aaron Craig
; to "/" and getting rid of the drive you can do this: my $sPath = "C:\\foo\\bar"; $sPath =~ s/^[a-z]+://i; $sPath =~ s/\\/\//g; print $sPath; Aaron Craig Programming iSoftitler.com

  1   2   >