RE: references and dereferencing

2002-06-06 Thread Nikola Janceski
] I guess it doens't work with multidimensional data structures? -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 11:42 AM To: Beginners (E-mail) Subject: Re: references and dereferencing From: Nikola Janceski [EMAIL

RE: references and dereferencing

2002-06-06 Thread Nikola Janceski
One last question: is there a difference between: @{ $HASH{$key} } = @array; $HASH{$key} = \@array; ?? I really appreciate the references lesson! 8^) - Nik The views and opinions expressed in

test and return within a list

2002-06-06 Thread Nikola Janceski
at /u/njancesk/script/newscopeit.pl line 506, near } if) I don't think Perl likes ifs in that area. Thanx Nikola Janceski When choosing between two evils, I always like to try the one I've never tried before. -- Mae West (1892-1980

RE: subroutine or subroutine

2002-06-05 Thread Nikola Janceski
I'd suggest using prototypes if you are going to be passing more than 3 variable references, or 3 or more different types of varible references. This is for your own sanity. -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:30 AM To:

RE: Why do we even HAVE to... (was: Why using use strict;)

2002-06-05 Thread Nikola Janceski
because it would reek havoc on all the perl one liners. And deter many beginners that are touching perl for the first time. And would annoy those who have to write a quick 5 line script in 3 seconds that forget a my for $line. -Original Message- From: Jake [mailto:[EMAIL PROTECTED]]

RE: Why do we even HAVE to... (was: Why using use strict;)

2002-06-05 Thread Nikola Janceski
feet wet... now my work is over my head and I am rewriting all my crappy code. P.S. to all newbies COMMENT, wish I knew what I was doing with my code a year ago. Nikola Janceski May the forces of evil become confused on the way to your house. -- George Carlin -Original Message

RE: First and second rate programmers

2002-06-05 Thread Nikola Janceski
The problem lies within the one liner code. But also some just don't understand it, and don't use perl often enough to care about it. This issue was brought up in the Apocalypse for Perl 6: http://dev.perl.org/perl6/apocalypse/1 (scroll to RFC 16) RFC 16: Keep default Perl free of constraints

RE: Thanks - Re: Regex problem extracting middle-word part of string

2002-06-05 Thread Nikola Janceski
shouldn't it be written as this to aviod that confusion: my $RandomScript = $Scripts[rand(@Scripts)]; -Original Message- From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 11:18 AM To: [EMAIL PROTECTED] Subject: Re: Thanks - Re: Regex problem

RE: probably a simple question

2002-06-05 Thread Nikola Janceski
$a ? $b : $c; is the same as if( $a ){ $b } else { $c } see perldoc perlop (I think) but I would have put the foreach in front for readability: foreach (@your_list) { $_ % 2 ? print blue\n : print red\n } -Original Message- From: Bryan R Harris [mailto:[EMAIL

RE: HTML in E-mail

2002-06-04 Thread Nikola Janceski
to this list and others. Nikola Janceski If at first you don't succeed, try, try again. Then give up. no use being a damned fool about it. -- W.C. Fields -Original Message- From: David T-G [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 9:56 AM To: perl beginners cgi Cc: John

RE: HTML in E-mail

2002-06-04 Thread Nikola Janceski
sucka) Poor me stuck with SH1Tty mail programs at work. -Original Message- From: David T-G [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 10:15 AM To: perl beginners cgi Cc: Nikola Janceski Subject: Re: HTML in E-mail Nikola -- ...and then Nikola Janceski said

RE: skip first array entry and exit foreach loop only

2002-06-04 Thread Nikola Janceski
use File::Find and turn on the option 'bydepth'; http://search.cpan.org/doc/GSAR/perl-5.6.1-TRIAL3/lib/File/Find.pm -Original Message- From: David vd Geer Inhuur tbv IPlib [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 9:05 AM To: [EMAIL PROTECTED] Subject: skip first

RE: but what about 5.5.3 was Re: Perl 5.8.0rc1 changelogs. What are you most excited about?

2002-06-03 Thread Nikola Janceski
All this means is that we are that much closer to Perl 6, or is it? Either way, I get that warm feeling deep inside when I think about the wonders of Perl 6. Nikola Janceski If I had only known. I would have become a locksmith. -- Albert Einstein (1879-1955) -Original Message

RE: Conditional Operator STDIN

2002-06-03 Thread Nikola Janceski
I am sure Jeff has a bunch of files lying around named: haha |-what? and good old `rm -rf *` I put that last one in my home directory just to scare the beejesus off the sysadmin guys. If you want to make it just use: touch '`rm -rf *`' -Original Message- From: Jeff 'japhy' Pinyan

RE: Day Month Issues

2002-06-03 Thread Nikola Janceski
you have -w or use warnings; You should only use a slice of the info you want. from the warnings I see you want min and hour. use: ($min,$hour)= ( localtime(time) )[1,2]; # no warnings -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 1:55

RE: Simple pointer kind of question

2002-05-30 Thread Nikola Janceski
Ouch.. that's really wrong. read up on: perldoc perldata (search for Typeglobs) Here is a snip from the manpage: Typeglobs and Filehandles Perl uses an internal type called a typeglob to hold an entire symbol table entry. The type prefix of a typeglob is a *, because it

RE: iterating over the contents of a directory

2002-05-29 Thread Nikola Janceski
check out opendir readdir and closedir. -Original Message- From: Torres, Jose [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:23 AM To: '[EMAIL PROTECTED]' Subject: iterating over the contents of a directory Hi, How can I simply iterate over the contents of a

RE: iterating over the contents of a directory

2002-05-29 Thread Nikola Janceski
Oh and I forgot glob() -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:27 AM To: Nikola Janceski; Torres, Jose; [EMAIL PROTECTED] Subject: RE: iterating over the contents of a directory You might also check out perldoc

RE: iterating over the contents of a directory

2002-05-29 Thread Nikola Janceski
Message- From: Torres, Jose [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:35 AM To: 'Nikola Janceski' Subject: RE: iterating over the contents of a directory I have some code like this: sub CreateChecksum { my($dir) = @_; opendir(DIRHANDLE, $dir) || ERROR

RE: scheduler question

2002-05-29 Thread Nikola Janceski
Perhaps write a perl script that is inifinitely looping and sleeps 10 secs then runs your other script. while (1){ sleep 10; system(myotherscript.pl); } -Original Message- From: Lance Prais [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:51 AM To: Perl Subject:

RE: scheduler question

2002-05-29 Thread Nikola Janceski
It's amazing that wincron turned up more results than wincrap http://www.google.com/search?hl=enie=UTF8oe=UTF8q=wincrap -Original Message- From: Mikhail Kyurshin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:58 AM To: Perl Cc: Lance Prais Subject: Re: scheduler

RE: Shredding a file

2002-05-29 Thread Nikola Janceski
Brain Bugs are next. Then the NSA will be selling off the porn movies that I dream up. -Original Message- From: zentara [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: Re: Shredding a file On Tue, 28 May 2002 20:15:58 +0100

RE: Shredding a file

2002-05-28 Thread Nikola Janceski
I think if you want the file contents to be completely UNRECOVERABLE you must.. MUST change the contents of the file to some value other that it is.. I just usually fill the file up with ZEROs until the size is the same as it orginally was. Then I delete it. -Original Message- From:

RE: checking for an empty string

2002-05-28 Thread Nikola Janceski
umm.. there's several ways. The following assumes you chomped the line already. see perldoc -f chomp if length($line) if $line # assuming it won't just have a 0 in it. if $line !~ /^$/ -Original Message- From: lz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 10:09 AM To:

RE: Shredding a file

2002-05-28 Thread Nikola Janceski
28, 2002 11:24 AM To: [EMAIL PROTECTED] Subject: RE: Shredding a file --- Nikola Janceski [EMAIL PROTECTED] wrote: I think if you want the file contents to be completely UNRECOVERABLE you must.. MUST change the contents of the file to some value other that it is... I just usually fill

RE: Shredding a file

2002-05-28 Thread Nikola Janceski
Not to fuel the fire. (well I am). Don't hard drives read data by reading the changes of polarity on the disk over a distance? If so wouldn't replacing the data with some other junk data of equal size in the same location as data cause the data to be unrecoverable, (for assurance purposes

RE: the sort routine

2002-05-28 Thread Nikola Janceski
perldoc -f sort sort sort's by cmp by default... for numerical use sort { $a = $b } -Original Message- From: Eric Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 4:03 PM To: [EMAIL PROTECTED] Subject: the sort routine Hi People, I have this flat text file

RE: Gettting Drives on Windows

2002-05-24 Thread Nikola Janceski
system on my request. Think it was either Nikola Janceski or Beau Cox. Could you pls resend the zipped file or the link to it. Appreciate it!! Thanks Shishir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

RE: Problems with programming a forum

2002-05-24 Thread Nikola Janceski
for you locking prob... use flock() -Original Message- From: Sebastian Nerz [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 11:20 AM To: [EMAIL PROTECTED] Subject: Problems with programming a forum Hy, I actually want to write a little forum-script for my homepage, but

RE: Lies, damn lies and statistics

2002-05-24 Thread Nikola Janceski
] (Timothy Johnson) 87 5909 67 [EMAIL PROTECTED] (Nikola Janceski) 75 3998 53 [EMAIL PROTECTED] (Chas Owens) 72 2768 38 [EMAIL PROTECTED] (Jonathan e. paton) 70 3055 43 [EMAIL PROTECTED] (John W. Krahn) 67 1875 27 [EMAIL PROTECTED] (Jeff 'Japhy' Pinyan) 56

RE: Mail::Sender

2002-05-23 Thread Nikola Janceski
Code please? (If I were a mind reader would I be programming?) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 10:11 AM To: [EMAIL PROTECTED] Subject: Mail::Sender I receive the following error when using the Mail::Sender

RE: Strange total from adding 2 numbers

2002-05-23 Thread Nikola Janceski
um... those are big floats. I don't think you can store numbers that big. -Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:00 PM To: 'Timothy Johnson'; '[EMAIL PROTECTED] '; '[EMAIL PROTECTED] ' Subject: RE: Strange total from adding

RE: Hello all this grading program is still messing up

2002-05-23 Thread Nikola Janceski
That code looks like some of my first few scripts that I ever wrote, and that I am currently re-writing (from scratch) to be more managable. Nikola Janceski He who asks is a fool for five minutes, but he who does not ask remains a fool forever. -- Chinese Proverb

RE: chop ing

2002-05-23 Thread Nikola Janceski
that will work. but shouldn't you be using sprintf() for this? -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 4:55 PM To: Mat Harris; [EMAIL PROTECTED] Subject: RE: chop ing does $chopped_char = chop $netout_new; work

RE: power of

2002-05-22 Thread Nikola Janceski
are you looking for the ** operator? perldoc perlop Exponentiation Binary ** is the exponentiation operator. It binds even more tightly than unary minus, so -2**4 is -(2**4), not (-2)**4. (This is implemented using C's pow(3) function, which actually works on doubles

RE: Time a function

2002-05-22 Thread Nikola Janceski
$starttime = time; function_that_takes_long_time(); $deltatime = time - $starttime; ## time it took in seconds (no perfect but simple and fast) -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 10:50 AM To: [EMAIL PROTECTED] Subject:

RE: RFC for the three levels of beginnerNeff

2002-05-22 Thread Nikola Janceski
why not rename them to Know nothing, Know something, Know most things, use Perl; respectively? maybe I should change my sig to say: Nikola Janceski Know most things $ == 0; -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 12:28 PM To: begin

RE: Please take gracecarmel@yahoo.com off the list

2002-05-22 Thread Nikola Janceski
Do people just not read the very bottom of these things? To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -Original Message- From: Grace Lontok [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 3:27 PM To: Kipp, James; [EMAIL

RE: Fastest method with a hashes...

2002-05-20 Thread Nikola Janceski
]] Sent: Monday, May 20, 2002 5:08 PM To: 'Nikola Janceski'; Beginners (E-mail) Subject: RE: Fastest method with a hashes... The only other thing I can think of that you haven't mentioned is just cycling through the keys 'till you get one that matches, which is probably not the fastest

RE: Fastest method with a hashes...

2002-05-20 Thread Nikola Janceski
found it... some damn values were empty. -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 5:17 PM To: 'Timothy Johnson'; Nikola Janceski; Beginners (E-mail) Subject: RE: Fastest method with a hashes... That would be my grep method

RE: C/C++ Comment Extractor : Help!!

2002-05-16 Thread Nikola Janceski
Heheheh... My company has actually just completed such a project for generating help docs from the C/C++ comments in our code which accompany our regular help docs. Hehheh... the funny part is that it took about a year to develop to conform to the various comments. Our clients can even use it to

RE: stop the Madness

2002-05-16 Thread Nikola Janceski
See answers of a mid-level (3 years) Perl user below. -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 12:11 PM To: [EMAIL PROTECTED] Subject: stop the Madness the sole purpose for me using perl is to: 1) manipulate ascii files with

RE: stop the Madness

2002-05-16 Thread Nikola Janceski
print Resistance is futile\n; -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 1:45 PM To: [EMAIL PROTECTED] Subject: RE: stop the Madness And there's always those days where you start sending out emails with semicolons at the

RE: proper way to start daemon

2002-05-16 Thread Nikola Janceski
I have been know to run out of processes on a server. So... if your daemon is spawning other processes and dies because No more processes. Then I'd suggest using a cron-jobbed script that checks to see if your daemon is alive and running at regular intervals, and if it isn't to restart it again.

Network names and the comments

2002-05-15 Thread Nikola Janceski
Hey all, I posted this on perl-ntadmins@topica and it seems either I stumped them or they are all still sleeping. Any clues on a solution? -Original Message- From: Nikola Janceski Sent: Wednesday, May 15, 2002 9:16 AM To: '[EMAIL PROTECTED]' Subject

RE: cp -r problem

2002-05-09 Thread Nikola Janceski
Attached is a script that I created for doing such a thing, but instead of copying it links files. So you can finagle the program to your needs. It's specific for my needs so some of the stuff in there is not needed for you. NOTE: this requires perl v5.6.1 or higher to work. PS. you will

RE: Capture of console messages?

2002-05-07 Thread Nikola Janceski
## first way $output = `command 21`; ## second way open(OLDOUT, STDOUT) or die $!; # backup filehandles open(OLDERR, STDERR) or die $!; open(STDOUT, $tempDir/patchnull.$userName.$machineName.crap.out$$) or die $!; # remap them open(STDERR,

timestamp of files in perl

2002-05-07 Thread Nikola Janceski
/build/assign/listassign.cgi?reverse=on Nikola Janceski Summit Systems, Inc. 212-896-3400 You can pretend to be serious; you can't pretend to be witty. -- Sacha Guitry (1885-1957) The views

RE: Ok- real dumb question

2002-05-07 Thread Nikola Janceski
What if I change my name to a symbol (like the artist formerly known as Prince)? Some ideas for my new name: rm -rf * /dev/null pop @women -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 11:20 AM To: [EMAIL PROTECTED] Subject: Re: Ok- real

OT: copyrights (was: lynx)

2002-05-07 Thread Nikola Janceski
{way off topic) If a web browser modifies a published webpage as per the user's input, is there a copyright infringement? -Original Message- From: Buskirk, Richard Mr USAREC [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 1:47 PM To: [EMAIL PROTECTED] Subject: RE: lynx

RE: timestamp of files in perl

2002-05-07 Thread Nikola Janceski
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 12:04 PM To: Nikola Janceski Cc: [EMAIL PROTECTED] Subject: Re: timestamp of files in perl Nikola == Nikola Janceski [EMAIL PROTECTED] writes: Nikola I find that hard

RE: Sorting problem

2002-05-06 Thread Nikola Janceski
take out the spaces @sorted = {$a-[2] = $b-[2]} @AoA but this gives a cannot ^ ^ No spaces should be here -Original Message- From: Richard Adams [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 10:18 AM To: [EMAIL PROTECTED] Subject:

RE: use strict

2002-05-06 Thread Nikola Janceski
I am going to try to answer this one, (I think I understand it): use strict; package Foo; my $var1; our $var2; package Bar; $Foo::var1; # this how you call var1 from package Foo; $var2; # this how you call var2 (our makes it global across packages [and modules?]) [our == use vars qw()]

RE: Doing a little formatting

2002-05-06 Thread Nikola Janceski
perldoc -f printf it's just like C's printf. -Original Message- From: Batchelor, Scott [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 3:14 PM To: '[EMAIL PROTECTED]' Subject: Doing a little formatting I am listing several variables...but I would like to make them all

RE: developing and testing first CGI/Perl application

2002-05-03 Thread Nikola Janceski
Sweet link, passing that on to some of my co-workers. And there go my nipples again. -- Capt. Murphy (Sealab 2021) http://www.juliao.org/text/tao-of-p.shtml (Tao of programming) -Nik -Original Message- From: Tor Hildrum [mailto:[EMAIL PROTECTED]] Sent: Friday, May 03, 2002 10:02 AM

RE: (OT) Klez virus

2002-05-02 Thread Nikola Janceski
Yeah. Algorithm: Check mail if PGP encrypted. Check PGP signature against your key ring. Remove mail if not signed with a key from your ring. IMHO, I don't think virus writers know my passphrase to encrypt thier virus for outgoing mail. 8^P -Original Message- From: Michael D. Risser

RE: (OT) Klez virus

2002-05-02 Thread Nikola Janceski
), and then my AV software came up with a warning. In the end, IE crashed, AV went back to sleep and I rebooted. Just a weird thing I guess. -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 11:30 AM To: 'Nikola Janceski '; ''Michael D

OT: Cross-Posting (was: query about empty return value from SELECT)

2002-05-02 Thread Nikola Janceski
How is this a CGI related question? It's not. This is strictly a perl beginner question. I am sorry Aman for using your e-mail as an example. Cross-posting is annoying to many of us that are subscribed to several of these similar lists. If you absolutely feel it is necessary to cross-post for

RE: perl and java

2002-05-01 Thread Nikola Janceski
I think this is going to be implemented in Perl 6... but don't know if it's possible in Perl 5. -Original Message- From: Qi zhang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 1:56 PM To: [EMAIL PROTECTED] Subject: perl and java Hello all, Did someone know it is

RE: PDK

2002-05-01 Thread Nikola Janceski
I still wonder how I learned perl without syntax highlighting (talking Perl 4)? How did every manage without nedit (nedit.org)? -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 01, 2002 4:16 PM To: 'Ned Cunningham'; [EMAIL PROTECTED] Subject:

RE: Pass variables from parent to child script

2002-04-30 Thread Nikola Janceski
what does your system command look like? Are you running this on UNIX? if so, why not use fork? you might be interested in reading the: perldoc perlipc There is usually a chapter in every perl book on IPC. Some are better than others. what kind of varibles do you want to pass? (how

RE: Pass variables from parent to child script

2002-04-30 Thread Nikola Janceski
: When I move this code from my machine to a server, I want to change the variables that declare the location of the data to be processed only once, not in every script that needs to know that data location. Thanks for your help. Nikola Janceski [EMAIL PROTECTED] wrote in message news

RE: Brand New Perl Beginner - trouble using activePerl

2002-04-30 Thread Nikola Janceski
try opening a command prompt in the directory with the perlscript and type in the name of the perl script: c:\scripts test.pl -Original Message- From: Larry [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 6:01 PM To: [EMAIL PROTECTED] Subject: Brand New Perl Beginner -

Import debug commands from file?

2002-04-30 Thread Nikola Janceski
in all the time (nor do I like to cut and paste). I have read the perldoc perldebug and some of perldebguts, but I can't find (or missed) anything on such a thing. Any help or links is appreciated. Thank you, Nikola Janceski Nice boy, but about as sharp as a sack of wet mice. -- Foghorn Leghorn

RE: simple problem

2002-04-29 Thread Nikola Janceski
General Rule of Thumb: Don't cross post. If you must. Post once on one list. Wait for responses. If you don't get the answer you are looking for. Post once on your other list. Repeat as necessary. There are many of us who are subscribed to several lists and don't like the

RE: Unix to dos; dos to unix...

2002-04-25 Thread Nikola Janceski
unix2dos and dos2unix is what you are looking for. I tried with perl also and was unsucessful also for same reason. -Original Message- From: Ron Powell [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 10:08 AM To: '[EMAIL PROTECTED]' Subject: Unix to dos; dos to unix...

Advice and suggestions needed for difftree script

2002-04-25 Thread Nikola Janceski
? or is there something better? you can just correct above. Is there a way just to look for diff (ignoring whitespace) in the file better than using qx/diff -w -h/? Nikola Janceski I feel like an outsider... on the inside. -- Nicky J. from da' Bronx

RE: Advice and suggestions needed for difftree script

2002-04-25 Thread Nikola Janceski
Oops... if $dev1 != $dev2 and $inode1 != $inode2 should be: if not $dev1 == $dev2 $inode1 == $inode2 -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 10:33 AM To: Beginners (E-mail) Subject: Advice and suggestions

RE: Setting a Variable to String with \n?

2002-04-24 Thread Nikola Janceski
try this: $string = This is the text I want But I also want this text on the next line how can I write this code so that it looks nicer than this.\n; who said quotes can't span multiple lines? or this: $string =END This is the text I want But I also want this text on the next line how can I

RE: Setting a Variable to String with \n?

2002-04-24 Thread Nikola Janceski
on the next line. This may be trivial, but I'm just trying to make my code look some what neat. Thanks for the help. --- Nikola Janceski [EMAIL PROTECTED] wrote: try this: $string = This is the text I want But I also want this text on the next line how can I write this code so

RE: Setting a Variable to String with \n?

2002-04-24 Thread Nikola Janceski
GOO! That's worse than a heredoc followed by a quick substitution! I've been reading the Apocalypse docs and pissing in my pants! Perl 6 sounds like it's gonna be different but elephant craploads of fun! -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED]] Sent: Wednesday,

RE: unexpected results with grep

2002-04-23 Thread Nikola Janceski
inside grep $_ is a special var assigned to each value of the array. use another var for the //; -Original Message- From: Nazary, David [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 12:29 PM To: '[EMAIL PROTECTED]' Subject: unexpected results with grep Hi, I am

RE: variable not set as expected

2002-04-23 Thread Nikola Janceski
how are using this subroutine in your code? Can you give us the line where you use this sub, Tk is bit picky at times when you try funky things. -Original Message- From: richard noel fell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 10:45 AM To: [EMAIL PROTECTED]

RE: variable not set as expected

2002-04-23 Thread Nikola Janceski
I can't make sense of the code. Sorry, but this is what I see looking back.. [map {[ 'command', $_,-command=sub{$test_path=$tests_directory./.$_; print $test_path\n;}]}@test_files]; This line... you will understand if broken up by some white space [ map { [ 'command',

Line number of whence called

2002-04-23 Thread Nikola Janceski
; Nikola Janceski Before God we are all equally wise - and equally foolish. -- Albert Einstein (1879-1955) The views and opinions expressed in this email message are the sender's own, and do

RE: Line number of whence called

2002-04-23 Thread Nikola Janceski
I am atheist so I don't believe in the Religion Module. 8^P PS you're right... should have used Carp. -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:24 PM To: [EMAIL PROTECTED] Subject: Re: Line number of whence called Is

RE: unexpected results with grep

2002-04-23 Thread Nikola Janceski
np.. I forgot to CC the list those past few times. -Original Message- From: Nazary, David [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 1:34 PM To: 'Nikola Janceski' Subject: RE: unexpected results with grep It worked just fine. Thanks very much for you help Nikola

RE: remove duplicate values from array

2002-04-22 Thread Nikola Janceski
Gosh.. what ever happened to good ol' grep my %seen; @uniq = grep !$seen{$_}++, @array; -Original Message- From: Jon Howe [mailto:[EMAIL PROTECTED]] Sent: Monday, April 22, 2002 12:30 PM To: [EMAIL PROTECTED] Subject: remove duplicate values from array Can anyone tell me the

RE: Inverse tangent function?

2002-04-22 Thread Nikola Janceski
perldoc perlfunc atan2 Y,X Returns the arctangent of Y/X in the range -pi to pi. For the tangent operation, you may use the Math::Trig::tan function, or use the familiar relation: sub tan { sin($_[0]) /

RE: How to test if a module is installed ?

2002-04-19 Thread Nikola Janceski
command line: perl -e use Image::Size if you get an error, it's missing, else it's installed. -Original Message- From: Dennis Senftleben [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 12:03 PM To: [EMAIL PROTECTED] Subject: How to test if a module is installed ? Hi !

RE: What Causes PerlMongering

2002-04-18 Thread Nikola Janceski
a) not knowing what has already been done in Perl a la the CPAN A lot of my early work would have been spared if I knew that CPAN had EVERYTHING close to perfect that I wrote badly. b) other alternatives that exist in other open source solutions Eh... I let

RE: Removing the last character from a string

2002-04-17 Thread Nikola Janceski
this worked for me: use warnings; use strict; my $string = qq(one two three four); $string =~ s/\$//; # replace last with nothing print $string\n; __END__ What did your code look like? What version of perl are you using? -Original Message- From: Scot Robnett [mailto:[EMAIL

RE: grep a array element..

2002-04-16 Thread Nikola Janceski
uh... my $lookfor = qr/car/; # this is faster and you don't even need to put in the // -Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 9:42 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: grep a array element.. You mean

RE: grep a array element..

2002-04-16 Thread Nikola Janceski
Please do... I thought using qr// to store REs in variables speed up since it gets compiled once instead of over and over again. -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 11:50 AM To: Nikola Janceski Cc: '[EMAIL PROTECTED

RE: examining a file line-by-line

2002-04-15 Thread Nikola Janceski
I asked this same question.. The second way would be more efficent if you put the pattern that will match more often first/at the top. -Original Message- From: Dave Chappell [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 10:30 AM To: [EMAIL PROTECTED] Subject: examining a

RE: Sending Command Output over Net::FTP

2002-04-15 Thread Nikola Janceski
you probably want to use open(); open(COMMAND, sqlrun mysqlfile.sql |) or die cannot execute: $!; while(COMMAND){ #ftp stuff } -Original Message- From: Balint, Jess [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:05 PM To: '[EMAIL PROTECTED]' Subject: Sending Command

RE: Sending Command Output over Net::FTP

2002-04-15 Thread Nikola Janceski
:12 PM To: 'Nikola Janceski' Cc: '[EMAIL PROTECTED]' Subject: RE: Sending Command Output over Net::FTP Can I still receive the exit code from that command that way? That is how I am testing if the query ran correctly. Hence: $code = system( sqlrun mysqlfile.sql ); print Error if $code

RE: Question about this list

2002-04-15 Thread Nikola Janceski
um... have you tried filtering by [EMAIL PROTECTED] in the header? it's always there, and there is an option in Outlook for it in the rules wizard. -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:02 PM To: 'Paul Ennis'; 'Troy May'

RE: Question about this list

2002-04-15 Thread Nikola Janceski
: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:12 PM To: 'Troy May'; Nikola Janceski; Timothy Johnson; 'Paul Ennis' Cc: Perl Beginners Subject: RE: Question about this list Saweet! Didn't see that one... I'd feel sheepish if I didn't feel so free

RE: Preview data

2002-04-12 Thread Nikola Janceski
CGI module. --- Kris G Findlay - Original Message - From: Nikola Janceski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 12, 2002 2:18 PM Subject: RE: Preview data uh... Are you using the CGI module? This test CGI script can take 'hello what

RE: Help with MIME::Lite module

2002-04-12 Thread Nikola Janceski
you are using single quotes '' which don't interpolate. use double quotes . -Original Message- From: FLAHERTY, JIM-CONT [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 8:56 AM To: Jim (E-mail); Beginners (E-mail) Subject: Help with MIME::Lite module I am wanting to send

RE: Preview data

2002-04-12 Thread Nikola Janceski
uh... Are you using the CGI module? This test CGI script can take 'hello what?' and when submitted will return the exact same thing. What kinda problem are you really having? #!perl use strict; use warnings; use CGI qw(:standard); print header(); if(param()){ print param('crap'), p();

RE: Preview data

2002-04-12 Thread Nikola Janceski
And why can't you do the same with the CGI module? $page_o_html = hidden(-name = 'crap', -value = $crap); would be the same thing. You lost me on that... plus if you really need to, I have ADDED the CGI at a later point to a pre-existing script and only change the portions that I really wanted

RE: Input | Program | Output : help

2002-04-12 Thread Nikola Janceski
You might want to look at IPC::Open2 You can open a system command with an INPUT pipe and OUTPUT pipe. Here is how I used it. open2(*READ, *ZIPIT, /apps/bin/zip $FORM{'zipfile'} -@ 21); READ is the input pipe ZIPIT is the output pipe Perl Gurus, Yeah I should have used the ZIP module.. I am

RE: Input | Program | Output : help

2002-04-12 Thread Nikola Janceski
did you try reading the docs? You didn't even try to use my example. perldoc IPC::Open2 -Original Message- From: Tirthankar C. Patnaik [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 1:52 PM To: Nikola Janceski Cc: [EMAIL PROTECTED] Subject: RE: Input | Program | Output

RE: Input | Program | Output : help

2002-04-12 Thread Nikola Janceski
:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 2:00 PM To: Nikola Janceski Cc: [EMAIL PROTECTED] Subject: RE: Input | Program | Output : help did you try reading the docs? You didn't even try to use my example. I did try. I could not understand your example. Let me explain

RE: Input | Program | Output : help

2002-04-12 Thread Nikola Janceski
perldoc perlipc IPC - InterProcess Communication It's a trick devil of a subject, lots of restrictions (OS) and bugs (also OS) when you delve too deep. -Original Message- From: Tirthankar C. Patnaik [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 2:34 PM To: Nikola Janceski

RE: comparing files

2002-04-12 Thread Nikola Janceski
On UNIX it's called diff. 8^P -Original Message- From: Jerry Preston [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 4:23 PM To: begginners Subject: comparing files I want to compare one file to another. Is it better to read the files line by line into an array or and

RE: comparing files

2002-04-12 Thread Nikola Janceski
On a serious note... I just did a quick search on cpan (search.cpan.org) for 'diff' and a bunch of stuff came up.. but I never used any of it. You might want to check Algorithm::Diff if you are diffing two files. -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent

RE: Preview data

2002-04-12 Thread Nikola Janceski
CGI module. --- Kris G Findlay - Original Message - From: Nikola Janceski [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 12, 2002 2:18 PM Subject: RE: Preview data uh... Are you using the CGI module? This test CGI script can take 'hello what

<    1   2   3   4   5   >