RE: switch

2002-10-13 Thread nkuipers
You are doing your matching wrong. The only time you can refrain from using the binding operator =~ is when it would be binding the $_ variable. In your case, you are binding against $Ans. Incidentally, I think you can rewrite this: while( ( $Remainder = ($P_length%$CYLLENGTH) ) != 0 ){ #!=0

RE: switch

2002-10-12 Thread nkuipers
Nevermind I am completely on crack, ignore my entire last email, your putting a scalar in a for loop threw me off. You are in fact binding against $_. I will now retreat under a rock of embarassment and seriously re-consider my association with the entire Perl language. What a crappy day...

RE: html regular expressions

2002-10-11 Thread nkuipers
May we assume that you want to apply regexes to HTML to check formedness? Or are you wanting to detect dangerous HTML in a document? It helps to state what your goal is. :) A good module to check out for general HTML mangling might be CPAN's HTML::Parser which will "recognize markup and sepa

RE: switch

2002-10-11 Thread nkuipers
You could use a ternary operator here: $Ans =~ m/u/i ? print "u\n" : $Ans =~ m/d/i ? print "d\n" : $Ans =~ m/r/i ? print "r\n" : (some default); :) >= Original Message From Mark Goland <[EMAIL PROTECTED]> = >Hi guys, > >I am trying to implement a switch statment in perl. I have tryed d

RE: SUID and getting the basename

2002-10-11 Thread nkuipers
You need the program name, hence the $0. But you've wrapped the path in backticks, which Perl interprets as an OS command. I think you mean single quotes, but double quotes are better for $0 interpolation: my $oraProgName = "/path/to/$0"; You could also use the caller function, for example:

RE: " use warnings;" doesn't work

2002-10-10 Thread nkuipers
If you put the -w flag in your shebang line like this #!/usr/bin/perl -w does it still throw an exception or do the warnings work? >= Original Message From stanley <[EMAIL PROTECTED]> = >i use solaris and ihave no root right.the version of perl5.005_03 > >in a simple script if i try to

RE: Problem with hashes

2002-10-10 Thread nkuipers
I think your script is failing at the defined($line = ). So the hash is not getting populated at all. I think this because your call to open didn't include a <, as in open FH, "< your_file" or die $!; Try adding that to your open call and see if it makes a difference. >= Original Message

On script sandboxing

2002-10-10 Thread nkuipers
Pardon my ignorance, but what's the deal? Unless it comes authored, tested and at least partially documented, like a CPAN module for example (other than Safe.pm ;), why take the risk of exposing one's system to some script off the Net? Saves time? Why reinvent the wheel? How much time is sp

Rephrase the list literal question

2002-10-09 Thread nkuipers
The following is from page 75 in the Camel: "List assignment in scalar context returns the number of elements produced by the expression on the right side of the assignment: $x = ( ($a, $b) = (7,7,7) ); #set $x to 3, not 2 " why. how. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

list literal stuff

2002-10-09 Thread nkuipers
Hello everyone, The following is from page 75 in the Camel: "List assignment in scalar context returns the number of elements produced by the expression on the right side of the assignment: $x = ( ($a, $b) = (7,7,7) ); #set $x to 3, not 2 " It goes on to explain how this is useful but fr

RE: what is $self->verbose

2002-10-09 Thread nkuipers
Supplying module names makes answering it easier to give a better answer. Idiomatically, $self usually refers to the scalar being blessed into a class, in other words, an object. So $self->verbose is indeed calling a method on the object using the indirect syntax, though whether or not this m

RE: $RIDLINE = 'RID\s+=\s+(\d+-\d+-\d+)';

2002-10-09 Thread nkuipers
It might help to say what module you found it in, since that would supply more context. Most generally, it looks like $RIDLINE is going to be put into a regular expression, perhaps something along the lines of m/$RIDLINE/ If you are asking about the \s+ sort of notation, then you need to read

RE: mixing long and short option

2002-10-09 Thread nkuipers
Hello, The documentation for GetOpt::Long on CPAN includes a section on configuring the module. Several properties of interest to be configured are auto_abbrev, bundling, and bundling_override. Says the blurb on the bundling description, for example: Enabling this option will allow single-c

RE: autoincrement and autodecrement

2002-10-08 Thread nkuipers
That's still not terribly specific. Actually the second case of zz=>aaa throws me but looking at it, this is my *guess* (someone PLEASE correct me). The first case is possible because (intuitively) B follows A and 'a' follows z (in a wraparound sort of way). The wraparound causes a carry so

RE: Number of open sockets

2002-10-08 Thread nkuipers
Not answering the question, more like adding to it. :) There was recently a fair bit of discussion on Perl profilers. I wonder if a Profiler would be applicable to socket info? >= Original Message From "Jessee Parker" <[EMAIL PROTECTED]> = >Is there a way to keep track of the number

RE: Speeding up subs with RegEx's

2002-10-08 Thread nkuipers
Instead of iterating through the keys and then using the key to get the value, it's easier on the eyes and I believe a little bit more efficient (could be wrong there) to do it this way: while ( (my $key, my $value) = each %yourhash ) { ... } This saves you from having to use $hash{$key}...you

RE: get IP of ppp device

2002-10-07 Thread nkuipers
> my @ip = $ipcf =~ m/IP Address.*?:\s+(\d+)\.(\d+)\.(\d+)\.(\d+)/; > (@ip == 4) || die "cant parse ip address from ipconfig\n"; > my $ipaddress = "$ip[0].$ip[1].$ip[2].$ip[3]"; > print "ip address = $ipaddress\n"; It seems like you are breaking up the ip only to put it ba

RE: Newbie Question.

2002-10-07 Thread nkuipers
>My question then, is how do you pass variables to perl script from the Unix >command line and how are those variables processed within the script? More >than likely, the variables will need to be passed to either an array or hash. Well, there are two main ways I know of to pass vars to Perl from

RE: how to pass a list to a subroutine?

2002-10-05 Thread nkuipers
>= Original Message From James Edward Gray II <[EMAIL PROTECTED]> = >If you want it in hash form, as it looks from your example, just copy >it to a hash: > >my %hash = @_; Remember though that if you are passing anything in scalar context, like an scalar or a reference, or more than one

RE: Will not read line and split.

2002-10-04 Thread nkuipers
Put use strict; use warnings; at the top of most programs you ever write. As for failing calls to open(), phrase the call like this: open FH, "< $file" or die "Could not read $file: $!"; Once the handle is opened successfully, iterate through the file line by line like this: while () { ...

RE: Reg Exp

2002-10-04 Thread nkuipers
I also appreciated this solution but for a different reason...it made me look up the $- and $+ variables. Very cool. I think it would be well worth the time for me (and any beginner) to give perldoc perlvar a thorough read... Cheers everyone, Nathanael >= Original Message From "Kipp, Ja

RE: how can i get rid of these new line characters?

2002-10-04 Thread nkuipers
A simple, if not elegant, way of doing it assumes that you have each sequence in its own variable, say in an array. Then: $sequence =~ s/\n//g; #remove ALL newlines $sequence .= "\n"; #re-add the terminal newline >= Original Message From "Prachi Shah" <[EMAIL PROTECTED]> = >Hmmm. One w

RE: CGI simple but not working

2002-10-03 Thread nkuipers
I've never used CGI before, I know nothing about it. Offhand though, from looking at your actual versus expected output (opened in new window ;) , I have to wonder if the reason you get a literal "textfield("flavour","mint") is because you have surrounded that statement in your code with a q()

RE: CGI simple but not working

2002-10-03 Thread nkuipers
I've never used CGI before, I know nothing about it. Offhand though, from looking at your actual versus expected output, I have to wonder if the reason you get a literal "textfield("flavour","mint") is because you have surrounded that statement in your code with a q() structure. In other word

RE: CGI simple but not working

2002-10-03 Thread nkuipers
First of all, if possible, use the Llama 3rd, not 2nd. Second, can you give the expected output and the actual output. What platform are you on, what version of perl are you using, etc? Nathanael "Ain't no blood in my body, it's liquid soul in my veins" ~Roots Manuva -- To unsubscribe, e-ma

RE: mysql syntax problem

2002-10-02 Thread nkuipers
>Use placeholders: Could you also use quote() for this? "Ain't no blood in my body, it's liquid soul in my veins" ~Roots Manuva -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

globbed items

2002-10-01 Thread nkuipers
Hello all, While reading the Cookbook, I came across the following on page 357: "If the value assigned to a typeglob is not a reference but itself another typeglob, then all types by that name are aliased. The types aliased in a full typeglob assignment are scalarand format." I have used

RE: How to execute a Perl script from a web page?

2002-10-01 Thread nkuipers
>Where can I find those Docs? at your prompt (unix) type exactly what David showed you, ie., perldoc -f system ;) >Brady Fausett wrote: > >> David, >> >> Ok here is a step by step of what I am trying to do. >> >> 1- User goes to a web page that has a file upload system on it. >> >> 2- User u

RE: another regx ...

2002-09-30 Thread nkuipers
This idea is even simpler though not purely regex: $yourstring =~ s/\..*//; @result = split /-/, $yourstring; >= Original Message From "Mark Anderson" <[EMAIL PROTECTED]> = >-Original Question- > >D-2165033-10.TKB61a => D 2165033 10 > >and > >4-2175587-08.TKB63a => 4 21755

RE: What Type Of Data Structure Is This?

2002-09-30 Thread nkuipers
>$tablename{"$table"} = { >"table_name"=> ["$table"], >"index_name"=> ["$index_name"], >"columns" => ["@column_name"], >"type" => ["$index_type"], >"tablespace"=> ["$tablespace_name"] > > Thi

RE: How Hard

2002-09-29 Thread nkuipers
>I have taken a little classroom work in perl. I believe it is very possible >to write a perl script to read a text file, strip the carriage return and >linefeed and write it to another file. > >How would the script look? Here's one way... my $infile = 'path/file.ext'; open IN, "< $infile" or d

RE: Searching & Storing

2002-09-29 Thread nkuipers
>= Original Message From "Henry Wong" <[EMAIL PROTECTED]> = >Hi all, I tried using the below codes provided but i got an error saying >"Can't locate Date/Manip.pm in @INC...etc". I reckon that the Date::Manip do >not exist in my library. Any other alternatives for my problem below? If you

RE: Problem with returned Array.

2002-09-29 Thread nkuipers
@mailboxes is an array of array references. You have to dereference every element before printing it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: module for manipulating text file

2002-09-28 Thread nkuipers
>> I meant, to read a line, search a string, deleting a line, etc. These are all things that Perl is inherently great for, so in addition to the module mentioned, it's worth stating that it is very easy to roll your own. =) Nathanael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

problem with overlapping matches and while m//g

2002-09-27 Thread nkuipers
Hello, I am trying to get the positions of every instance of a given substring within a given superstring (DNA sequence), and currently have a while ( $super_string =~ m/${sub_string}/gi ) { ... } construct. I was under the impression that the regex transmission would bump along every charac

RE: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread nkuipers
>Uncaught exception from user code: >No aliases!: Invalid argument at ./zz line 3. Well you have three arguments. If you are *sure* that the undef is not the problem, that leaves only two to possibly be invalid. To start, try battening down the hatches with use strict, predeclaring yo

RE: dbmopen can't open /etc/aliases.db file

2002-09-26 Thread nkuipers
Why is the third parameter in your dbmopen call undef? The example in perldoc -f dbmopen is almost identical to yours except that it defines that third parm as 0666. If the dbmfile does not already exist, it will be created with permissions specified by that third parm. >= Original Message

RE: "Or" Syntax

2002-09-26 Thread nkuipers
>If ($a=b) || ($a=c) || ($a=d) That almost looks right. I believe this will do it: if ( $a == $b || $a == $c || $a == $c ) { ... } or, for non-numerics: if ( $a eq $b || ... ) { ... } Cheers, Nathanael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

RE: need some parsing ideas )

2002-09-26 Thread nkuipers
Well here's an idea anyway... I wouldn't slurp the whole file at once, I would process line by line assuming all pertinent info per entry is a 1-liner as shown. You could first split on | which gives portionA, portionB. For portionA, split on white space; the second field is the time. For por

RE: Regular Expression help

2002-09-24 Thread nkuipers
>if($array[$x] =~ /\d{1,3}?/) >{ >...do something >} > >Unfortunately this if statement never appears to come true. That's because you have two quantifiers specified, the {1,3} and the ?. for (@array) { if ( m/^\d+$/ ) { #regex breaks on decimal numbers do something... } } -- To unsubscribe

retarded question about non-root mod installation

2002-09-24 Thread nkuipers
Hello all, When trying to install modules, it's all dandy until I get to the %make install part and then it cacks out with an error. I need to be root to install it into the path. How do I make install somewhere else? I can then explicity push onto @INC within my script. Thanks, Nathanael

RE: Using a variable name to invoke a subroutine

2002-09-24 Thread nkuipers
>foreach $sub (@list_of_subs) { > &{$sub}; ##-- this is the part I am stuck on. This doesn't work >} I don't know the answer to your question; I'm also interested in what others have to say. However, I have to wonder if Perl is looking at &{$sub} and interpretting it as a command to ex

RE: A good use for RegEx substitutions?

2002-09-24 Thread nkuipers
Using the /g modifier would be appropriate. Consider using the /e modifier which causes perl to execute code in the "replace-with" part of the s///. The following is from the Camel 3rd Ed, page 209: s/(\d+)/$1 * 2/; #Replaces "42" with "42 * 2" s/(\d+)/$1 * 2/e; #Replaces "42" with "84" Chee

RE: join hashes?

2002-09-23 Thread nkuipers
>I don't think I completely understand your code. When you put > > 'join( '|', values %hash )' That line of code is read pretty much the way it looks. It's like saying "Ok Perl, I want you to grab all the values in this hash and glue 'em together with a pipe character". So for example,

question to anyone using Perl for bio-sciences

2002-09-21 Thread nkuipers
Hello, I use Perl for DNA data mining and I'm just wondering what [non-bioperl] CPAN modules you make good use of in your work. Handling arbitrarily large/nested data structures is the main badboy here, but science-Perlers will know already the nature of the beast. I've hit a bit of a rut in

RE: Arg... what about $#hash $#array

2002-09-20 Thread nkuipers
>scalar (@array); >scalar (%hash); > >can be used to get the number of elements. For arrays, yes. For hashes, no. scalar %hash produces something that looks like this: 3/8, which is some measure of the number of buckets used by the hashing algo (efficiency). print scalar keys %hash, "\n"; w

RE: regex and ip address extraction

2002-09-19 Thread nkuipers
/\[(\d+\.\d+\.\d+\.\d+)\]/ hmmm...maybe this? /\[((?:\d+\.){3}\d+)\]/ #non-capturing parens group for {3}, nested in $1 parens -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: how to recognize a number with regex?

2002-09-18 Thread nkuipers
You might want to allow no decimal point. /\d+\.?\d+/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: more regexp stuff, maybe?

2002-09-18 Thread nkuipers
my $SQLfields = join ',', @Fields; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: head as in "unix"

2002-09-18 Thread nkuipers
>e.g. I have a file with a header - and I only need the data from line >100 and forward where the single lines are put in to a array for further >"treatment". If you are SURE of consistent formedness in your input file (data will always be at lines 100+) you could use the $. var, which holds the

RE: Help ! Newbie here :)

2002-09-18 Thread nkuipers
#@files contains filenames, let's say with paths prepended for $name (@files) { if $name =~ m/.txt$/ { open FH, "< $name" or die $!; do something... } } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Breaking up a large source file into several pieces

2002-09-18 Thread nkuipers
You don't need to write anything as a module per se. You can write a library instead, which merely contains the vars, subs and the like that you re-use often. Name it with a .pl extenstion. Then all you have to do is require "/path/libname.pl"; at the start of your code. -- To unsubscr

RE: pattern matching

2002-08-01 Thread nkuipers
>how do I find the line with only the "<" character? %perldoc perlre In the meantime, you could set the record separator to <, that is, $/ = '<'; then make a regex that captures the filename part separate from the rest. if (/^(filenamepattern)(.*)

RE: Regexp to match by hash key...

2002-08-01 Thread nkuipers
The reply given by Bob highlights surrounding var names within regexes with {}, ie., /${somevar}/. And though not related to your query, as a point of readability, consider using the big-arrow key-value notation when appropriate as in the current example, ie., my %hash = (1 => 'abc',

RE: Add directories to @INC

2002-08-01 Thread nkuipers
Page 300 of the Camel 3rd ed says: "any modifications to @INC need to occur at compile time...You can do this with the lib pragma described in Chapter 31 or with a BEGIN block." I think what our colleague meant by reinstalling Perl is that doing so will enable you to tell Perl where to look fo

RE: Extract text from argument

2002-08-01 Thread nkuipers
I suggest looking into the File::Basename module, which is bundled with perl. Most current documentation can be found at: http://search.cpan.org/doc/JHI/perl-5.8.0/lib/File/Basename.pm I suppose you could also use a regex...something like this perhaps? /.*(\\\w+)$/ cheers, nathanael -- T

RE: sendmail problem

2002-08-01 Thread nkuipers
>> 1. Can a variable store a text file with 4+ bytes >> in size? > >I am under the impression that a scalar can be as big as you need. I >*suspect* that the problem lies in limitations on the size of an part. I was under the

RE: how to grab a parameter from command line and do a search and replace in script

2002-08-01 Thread nkuipers
I am not sure about the search-and-replace aspect; too tired to even try. However as far as I understand, Getopt::Std only allows single digit parms that either accept a value or are boolean for being set at all. If you want a multi-digit parm, you need Getopt::Long. Documentation of the mos

RE: Need to extract just the mac id

2002-08-01 Thread nkuipers
>perl -lne'/^[[:xdigit:]]{4}(?:\.[[:xdigit:]]{4}){2}$/&&print' yourfile >From the original question, I believe that the desired target is 0008.0e39.ad80 and lines like it in the file. From your regex, I understand the anchors, and the quantifiers, and the clustering without capturing. Could

RE: regex error: runaway multi-line !! string starting on line...

2002-07-31 Thread nkuipers
>equate to this m!!x attempt: > >21 while ( my $line = ) { >22 while ( m! >23 ^# # match lines that start with >'#' >24 CommunityID=399 # or lines that >contain >

hash guts

2002-07-31 Thread nkuipers
Hello everyone, I want to count hash keys. I originally tried my $count = scalar %hash; which when printed gave the string 411/1024. I looked this up in perldoc perldata and sort of understand the significance of this result in terms of buckets. So I tried this in a driver where I varied t

RE: Editor

2002-07-31 Thread nkuipers
Well, I am working on linux, and I started with pico but now I use vi and am quite happy with it; fast movement, versatile copy-paste, colored syntax toggling...it does the job. I'll have to give nedit a look though if there are any linux offerings...people seem to be raving about it. regards

RE: Down and dirty duplicate deleter

2002-07-30 Thread nkuipers
Load the elements of an array into a hash. Then put the unique keys back into the array; add other goodies like sorting if you need, but one barebones way of doing it would be: for (@array) { chomp $_; $hash{$_}++ } @array = (); @array = keys %hash; -- To unsubscribe, e-mail: [EMAIL PROTECT

your frank opinion requested

2002-07-30 Thread nkuipers
Hello all, I am a relative newcomer to the language (couple of months), and I totally love it. One way or the other, I use it almost every day in my work, and even beyond practical applications I want to improve my Perl as much as I can. I own the Camel 3ed, and between that and a resource-g

RE: How to replace a literal with a variable

2002-07-30 Thread nkuipers
I'm probably not understanding what exactly you needbut...as I see it, $err holds whatever error message that you captured with a regex. So if you want to make a variable with the same name as the literal, dereference a variable with the name held in $err and the new var will autovivify:

RE: cisco regexp

2002-07-30 Thread nkuipers
>Jul 25 10:39:12 10.0.0.1 852: 1d23h: %VOIPAAA-5-VOIP_CALL_HISTORY: >CallLegType 2, ConnectionId 0 0 0 0, SetupTime *10:46:49.143 GMT Thu Jul >25 2002, PeerAddress 0051122323223, PeerSubAddress , DisconnectCause 0 >, DisconnectText , ConnectTime *10:47:09.753 GMT Thu Jul 25 2002, >DisconnectTime *

RE: Fetching web pages and displaying as text

2002-07-29 Thread nkuipers
>The code is as follows: > >#!/usr/bin/perl >use LWP::UserAgent; >$ua = LWP::UserAgent->new; >#$ua->env_proxy; # initialize from environment variables >$ua->proxy(ftp => '172.16.0.1'); >$ua->proxy(http => '172.16.0.1'); >#$ua->no_proxy(qw(no se fi)); >my $req = HTTP::Request->new(GET => 'http://w

RE: problem inserting a line into the middle of a page

2002-07-26 Thread nkuipers
The $. variable holds the current line number. So you could something along the lines of: open TOMYFILE, "filename" or die $!; &insert_at_line(*TOMYFILE, int); #int = what line you want to replace ## sub insert_at_line { my $linetoinsert = 'somemessage'

where would i look?

2002-07-25 Thread nkuipers
Hello all, Here's the situation. I work as an analyst for a genomics lab. We have a dedicated local BLAST (http://www.ncbi.nih.gov/) server. Whether from the summer heat, or a failing drive, or an OS bug, or some combination of various factors, our server is crapping out too frequently. Th

installing modules when not root...my bad

2002-07-25 Thread nkuipers
perl Makefile.PL LIB=~/somedir make make test make install blah -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: determining whether Net::FTP module present: version 5.005_03on Solaris

2002-07-25 Thread nkuipers
I learned just today actually how to install a module when not root. So, you have your module tarball all good to go: >mkdir ~/lib >tar -zxvf modulename.tar.gz >perl Makefile.PL LIB=~/lib >make test >make >make install and you should be fine the link where I found the above is: http://perlmon

on a lighter note

2002-07-25 Thread nkuipers
a bit of humour in appreciation for the help I've gotten on this mailing list. #!/usr/bin/perl no strict; $rules; my %hash = (smells => 'good'); for $i (@drag) { open EYES, "$i"."must" or warn "groovy man"; print "Once again, my hash makes me one with the Llama;" } close EYES and sleep; "You

RE: another sort question (flame away)

2002-07-24 Thread nkuipers
>Would trapping it an eval be what the doctor ordered? To answer my own question, no, it would not. #use warnings; would be better. =D Hope y'all got a good chuckle out of it anyway. "I think for my lunch tomorrow I'll make a tuna and pickle triangle bunwich." -- To unsubscribe, e-mail: [

RE: another sort question (flame away)

2002-07-24 Thread nkuipers
Bob wrote: <=> should probably still work, because when evaluating a string as a number, Perl will evaluate up to the first character that doesn't look like part of a number. so "1234 x5" evalutates as the number 1234 (stops at the space char). * I didn't know that. What I did after reading

another sort question (flame away)

2002-07-24 Thread nkuipers
Hello all, My hash keys look something like this: >1234 x5 So I am thinking a cmp, as opposed to <=> is best. What I want is for the keys to be sorted as follows: >1 x >2 x >3 x .. .. .. >n x This is what I have in my script at the moment: my @sort_this = keys %final_list; m

RE: How to expand Unix command in echo statement?

2002-07-23 Thread nkuipers
>$log="/tmp/ito.log" >`echo Warning: some text > $log` > >I need to expand the "date" command somewhere in this echo command, please >show me how. the perl localtime function returns the same information as a unix date command. printing to an append filehandle in perl is similar to echoing to a

RE: How to parse a full pathname into dir, file, ext?

2002-07-23 Thread nkuipers
>= Original Message From chris <[EMAIL PROTECTED]> = >Given a full pathname c:\windows\system32\kernel32.dll > >I need to parse this into a directory, file, and extension > >my $fullfilename = "c:\\windows\\system32\\kernel32.dll"; > >breaks down into the following > >my $dir = "c:\\window

RE: One Liner Problems

2002-07-23 Thread nkuipers
>= Original Message From "Balint, Jess" <[EMAIL PROTECTED]> = >Hello. What is wrong with this? > >perl -e 'for(1..300){sleep 1;print ".";}' > >It never prints anything. >Thanks. I wrote a script like this: for (1..5) { sleep 1; print "."; } when i ran it, i timed it. it took

RE: Cut string between the words

2002-07-23 Thread nkuipers
>I figure that I can use substr() to cut up a string, but how do I make it >between words? you can split the string on whitespace, for one. my @array = split /\s+/, $string; >How do I measure a string to see if it is greater than 85 characters? my $string_len = length($string); >Basically, if

RE: How to make @array2 use values of @array1?

2002-07-22 Thread nkuipers
What I am about to raise, I do so more out of wanting someone to educate me than disagreeing for the sake of. The *that syntax shown below is unfamiliar to me outside the context of referencing a filehandle in a subroutine params list, where it is optional (ie., &some_sub(*STDIN)). *that remi

RE: DBI problem

2002-07-18 Thread nkuipers
Try reinstalling the module perhaps. Did you use automated installation or manual? Were there ANY problems with the install. Are you SURE you installed it to the appropriate directory structure for referencing? I work in 5.6.0 and use the DBI module bundled with it; are there bug reports fo