Re: need some help with writing a basic program

2011-09-12 Thread Rob Dixon
On 12/09/2011 20:47, Ryan Munson wrote: The full exercise states: Write a program that asks for a decimal number less than 256 and converts it to binary. (Hint: You may want to use the bitwise and operator 8 times.) Since 256 is 2^8, I am assuming using a computation of 2**8 is involved. You

Re: need some help with writing a basic program

2011-09-12 Thread Jim Gibson
On 9/12/11 Mon Sep 12, 2011 12:47 PM, "Ryan Munson" scribbled: > The full exercise states: > > Write a program that asks for a decimal number less than 256 and converts > it to binary. (Hint: You may want to use the bitwise and operator 8 times.) > > Since 256 is 2^8, I am assuming using a co

Re: need some help with writing a basic program

2011-09-12 Thread Brandon McCaig
On Mon, Sep 12, 2011 at 3:47 PM, Ryan Munson wrote: > it to binary. (Hint: You may want to use the bitwise and operator 8 times.) > > Since 256 is 2^8, I am assuming using a computation of 2**8 is involved. The answer is in the hint. What does the bitwise-and operator give you? See perldoc perlop

Re: need some help with writing a basic program

2011-09-12 Thread Ryan Munson
The full exercise states: Write a program that asks for a decimal number less than 256 and converts it to binary. (Hint: You may want to use the bitwise and operator 8 times.) Since 256 is 2^8, I am assuming using a computation of 2**8 is involved. Ryan On 9/12/11 3:29 PM, "Brandon McCaig"

Re: need some help with writing a basic program

2011-09-12 Thread Brandon McCaig
On Mon, Sep 12, 2011 at 2:55 PM, Ryan Munson wrote: > I am running through a good book on Perl and am having some issues with a > script I am trying to create for one of the practice exercises (I am > teaching myself Perl for work). Just to let you know the solution does not > involve using an if

Re: need some help with writing a basic program

2011-09-12 Thread Ryan Munson
I could, but the book also mentions a hint to using the bitwise operator. Loops are still to come. =) Ryan From: Hal Wigoda Date: Mon, 12 Sep 2011 14:07:18 -0500 To: Ryan Munson Subject: Re: need some help with writing a basic program Use a while or for loop On Sep 12, 2011 1:58 PM

need some help with writing a basic program

2011-09-12 Thread Ryan Munson
Hi all, I am running through a good book on Perl and am having some issues with a script I am trying to create for one of the practice exercises (I am teaching myself Perl for work). Just to let you know the solution does not involve using an if statement because this is in the next chapter. The

Re: need some help excluding with file::find::rule

2010-01-22 Thread John W. Krahn
solaristar wrote: First please forgive me if this is the wrong way to go about asking this question. I already answered this question on comp.lang.perl.misc. Do you want me to answer it again here? John -- The programmer is fighting against the two most destructive forces in the universe:

need some help excluding with file::find::rule

2010-01-22 Thread solaristar
First please forgive me if this is the wrong way to go about asking this question. I have a script im working on that is looking to only get the filenames with ".mw.|.cw.|.uw." and exclude any filenames (which happen to be FQDNs of servers) that do not have that criteria the structure to search i

Re: Strange sorting, need some help

2008-07-21 Thread Gunnar Hjalmarsson
Amit Saxena wrote: On Mon, Jul 21, 2008 at 2:11 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: If you were using the <=> operator to compare non-numeric strings you would get a warning, but any scalar value is a valid string so you will get no warnings if you compare numeric values with the cmp oper

Re: Strange sorting, need some help

2008-07-21 Thread Amit Saxena
On Mon, Jul 21, 2008 at 2:11 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Tobias Eichner wrote: > > > > I'm currently dealing with a sample program I try to understand. Here it > is: > > > > --- > > > > #!/usr/bin/perl > > > > use strict; use warnings; use diagnostics; > > > > # Array to sort > >

AW: Strange sorting, need some help

2008-07-21 Thread Tobias Eichner
@rob: Thank you for your hints :-) __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://lear

Re: Strange sorting, need some help

2008-07-20 Thread Rob Dixon
Tobias Eichner wrote: > > I'm currently dealing with a sample program I try to understand. Here it is: > > --- > > #!/usr/bin/perl > > use strict; use warnings; use diagnostics; > > # Array to sort > my @unsortiert = qw(Z A z a 19 91); > > # Print array to sort > print "@unsortiert"; print "

Strange sorting, need some help

2008-07-20 Thread Tobias Eichner
I'm currently dealing with a sample program I try to understand. Here it is: --- #!/usr/bin/perl use strict; use warnings; use diagnostics; # Array to sort my @unsortiert = qw(Z A z a 19 91); # Print array to sort print "@unsortiert"; print "\n"; # Print positions of unsorted array (0 to last

Re: Need some help with XMLin

2008-05-29 Thread Jeff Peng
On Thu, May 29, 2008 at 12:02 AM, Vasant Kumar <[EMAIL PROTECTED]> wrote: > > $VAR1 = { B => { C => [ {1}, {2}. {3} ]} > > Now accessing B is no problem, but I want to access the values in C.. Hello, $VAR1->{B}->{C}->[0]; will get the first element of the anonymous array whose KEY is C. -- Jef

Need some help with XMLin

2008-05-29 Thread Vasant Kumar
Hi, I'm using PERL for the first time, and I need to parse an XML Document. Essentially we have a file that's structures like this now when I do something like $data = XMLin($XML, forcearray => ["C"]); It has something similar to $VAR1 = { B => { C => [ {1}, {2}. {3} ]} Now accessin

Re: need some help using strict??

2007-04-28 Thread Randal L. Schwartz
> ""FamiLink" == "FamiLink Admin" <[EMAIL PROTECTED]> writes: "FamiLink> I am trying to verify a credit card number format with the following: (below) "FamiLink> but I am getting errors like: Why not just use Business::CreditCard? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc

Re: need some help using strict??

2007-04-27 Thread Tom Phoenix
On 4/27/07, FamiLink Admin <[EMAIL PROTECTED]> wrote: I am trying to verify a credit card number format with the following: (below) but I am getting errors like: Global symbol "%r" requires explicit package name at ./modmember.cgi line 681. This is because, under 'use strict', you must declar

need some help using strict??

2007-04-27 Thread FamiLink Admin
I am trying to verify a credit card number format with the following: (below) but I am getting errors like: Global symbol "%r" requires explicit package name at ./modmember.cgi line 681. Global symbol "%r" requires explicit package name at ./modmember.cgi line 683. Global symbol "%r" requires

RE: I need some help with matching something

2006-09-20 Thread Lee Goddard
> I need to find every ocuring "... blok in a text, > even If this ocurs multiple times on 1 line. If you're doing HTML it's worth looking HTML::TokeParser for a quick and easy and generally reliable means of extracting the contents of the 'bold' element: great POD, too -- this is a slightly

I need some help with matching something

2006-09-20 Thread Bjorn Van Blanckenberg
I need to find every ocuring "... blok in a text, even If this ocurs multiple times on 1 line. example text: Inclus: eau, \303\251lectricit\303\251 et chauffage. responce should be: Inclus: chauffage. I tryed some things with perl or shell: echo 'Inclus: eau, \303\251lectricit\303\251 et

RE: Need some help filtering thru results

2006-08-30 Thread Charles K. Clarkson
Mike Blezien wrote: : My regrex is not very strong and need to some help figuring : out the best way to do this. I don't use regular expressions to parse HTML. I generally use HTML::TokeParser. The documentation is pretty good and I can step through the markup the same way I read it. HTH,

Need some help filtering thru results

2006-08-30 Thread Mike Blezien
Hello, We need to grab some data from a webpage fetch via the LWP module. This is the coding and the $resultdata below, need to regrex out various data, indicated by the [ ] brackets... see below for further explainations. My regrex is not very strong and need to some help figuring out the best

Re: Need some help and direction

2006-01-08 Thread Shawn Corey
Daniel Gladstone wrote: I thought this would be easy but I can not get it to work - can someone please help me: Problem: I have a file of 7.5 million records that are pipe delimted, the first field is a record number. I want to search for around 10 records with a specific record number and if

Re: Need some help and direction

2006-01-06 Thread JupiterHost.Net
Daniel Gladstone wrote: I thought this would be easy but I can not get it to work - can someone please help me: Problem: I have a file of 7.5 million records that are pipe delimted, the first field is a record number. I want to search for around 10 records with a specific record number and

Need some help and direction

2006-01-06 Thread Daniel Gladstone
I thought this would be easy but I can not get it to work - can someone please help me: Problem: I have a file of 7.5 million records that are pipe delimted, the first field is a record number. I want to search for around 10 records with a specific record number and if they meet that condition

RE: Need some help using lib to add custom directories to @INC

2004-09-16 Thread Wiggins d Anconia
> > > -Original Message- > > From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 16, 2004 9:03 AM > > To: Ron Goral; Perl Beginners; [EMAIL PROTECTED] > > Subject: Re: Need some help using lib to add custom directories to @IN

RE: Need some help using lib to add custom directories to @INC

2004-09-16 Thread Ron Goral
> -Original Message- > From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 16, 2004 9:03 AM > To: Ron Goral; Perl Beginners; [EMAIL PROTECTED] > Subject: Re: Need some help using lib to add custom directories to @INC > > > Please only po

Re: Need some help using lib to add custom directories to @INC

2004-09-16 Thread Wiggins d Anconia
Please only post to one group, if that group does not yield a good answer, then try a different one. Especially since this has nothing to do with CGI. > Can anyone tell me why this code fails when trying to load > Some_Module_In_lib_Dir- > == > my $file_path = > substr

Need some help using lib to add custom directories to @INC

2004-09-16 Thread Ron Goral
Can anyone tell me why this code fails when trying to load Some_Module_In_lib_Dir- == my $file_path = substr($ENV{SCRIPT_FILENAME},0,index($ENV{SCRIPT_FILENAME},'/test.cgi')); use lib "$file_path/../lib"; use Some_Module_In_lib_Dir; == And th

Re: Need some help

2002-07-01 Thread Mariusz Wyrozebski
You,re right! But I had some hours, so my solution is : - #!/usr/bin/perl $file = "$ARGV[0]"; open(HANDLE, '<' , "$file"); @lines=; foreach $line (@lines) { @test=split("#include",$line); print $test[0] ; @plik=split("#include <",$line); @plik1=split(">",$plik[1])

Re: Need some help

2002-07-01 Thread Nigel Peck
Could you please make it clear what you want to do (unless I'm missing the point) when you say you want to change the #include lines to their entry. Do you meant you want to put the data from the file in instead of the #include line? >>> Mariusz Wyrozebski <[EMAIL PROTECTED]> 07/01/02 03:29pm >>

Need some help

2002-07-01 Thread Mariusz Wyrozebski
I'm very curious about little script, that works as "prep" in c/c++. The problem is: We have one file, which contains lines like - #include #include blah,blah,blah - in blah you have nomal c program. Everything I want is to change li

expat and XML::Parser on OS X, need some help

2002-01-14 Thread David Jacopille
I'm having major difficulties installing a module on OS X. I've followed the minimal instructions on http://developer.apple.com/internet/macosx/perl.html but am getting numerous errors. Since I am a beginner at this I was wondering if someone could follow through my process and see if I'm mis

Re: not perl, but need some help with Linux...

2002-01-06 Thread Andy Ransom
On Sat, 5 Jan 2002, McCollum, Frank wrote: > Does anyone know where to get help if you destroy a computer while > installing Linux...? > HELP would be greatly (I mean greatly) appreciated. Please excuse the > non-perl question, but I know we got some Linux users here and I am > desparate now

RE: not perl, but need some help with Linux...

2002-01-06 Thread McCollum, Frank
rt [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 5:38 AM To: [EMAIL PROTECTED] Subject: Re: not perl, but need some help with Linux... Frank McCollum wrote: > Does anyone know where to get help if you destroy a computer while > installing Linux...? > > Problem (of cour

Tr: not perl, but need some help with Linux...

2002-01-06 Thread mb
-Message d'origine- De : maximilian sichart <[EMAIL PROTECTED]> À : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : dimanche 6 janvier 2002 11:44 Objet : Re: not perl, but need some help with Linux... >Frank McCollum wrote: > >> Does anyone know where to get h

Re: not perl, but need some help with Linux...

2002-01-06 Thread maximilian sichart
Frank McCollum wrote: > Does anyone know where to get help if you destroy a computer while > installing Linux...? > > Problem (of course this comes up after formatting c: drive and using a boot > disk) > 1. Linux autoboot.bat program detects windows running and will not install > (of course wind

not perl, but need some help with Linux...

2002-01-05 Thread McCollum, Frank
Does anyone know where to get help if you destroy a computer while installing Linux...? Problem (of course this comes up after formatting c: drive and using a boot disk) 1. Linux autoboot.bat program detects windows running and will not install (of course windows is not running, though) 2. Window

need some help...reading selecing items from a file

2001-10-21 Thread Tom Jones
Hi! I need some direction writing a perl script and would apprecitiate any help I could get. Okay, this is what I need to do... I've a text file that has kept a log of information. Here is some actual data from the file. -- - - - - - - - - - - - - - - - - - - - - Frame 1 - - - - - - -

Re: need some help ...

2001-07-02 Thread Tim Musson
Hey perl, Monday, July 02, 2001, 5:21:16 AM, my MUA believes you used (X-Mailer not set) to write: pdo> hi, pdo> I want to do this : pdo> i have some servers where i want to check if some files exists and the user pdo> must put the all path with the name of the file ... pdo> use strict; pdo

need some help ...

2001-07-02 Thread perl
hi, I want to do this : i have some servers where i want to check if some files exists and the user must put the all path with the name of the file ... use strict; #that's the file where my servers are ... open (LISTESERVEUR, "c:\\perl\\presence\\listeserveur.txt") || die "Ne peut ouvrir l

Re: I need some help ...

2001-06-25 Thread Aaron Craig
At 11:43 25.06.2001 +0200, [EMAIL PROTECTED] wrote: >En réponse à Aaron Craig <[EMAIL PROTECTED]>: > > > foreach my $fichier (@fichiers) > > { > > my $result = (-e $fichier)? "$fichier fait (stat $fichier)[7] > > octets\n" : > > "$fichier inexistant \n"; > >

Re: I need some help ...

2001-06-25 Thread perl
En réponse à Aaron Craig <[EMAIL PROTECTED]>: > I would do something like this: > > use strict; # very important, and saves a lot of headache! > > open (SERV, "c:\\perl\\bin\\liste.txt") || die "Could not open > liste.txt: > $!"; # added error checking > my @serveurs = ; > close (SERV); > open

Re: I need some help ...

2001-06-25 Thread Aaron Craig
I would do something like this: use strict; # very important, and saves a lot of headache! open (SERV, "c:\\perl\\bin\\liste.txt") || die "Could not open liste.txt: $!"; # added error checking my @serveurs = ; close (SERV); open (RESULT, ">>c:\\resultat.txt") || die "Could not open resultat.txt

Re: I need some help ...

2001-06-25 Thread Jos Boumans
well, first of all you want to take this open statement out of the 'for loop' and declare it before the loop starts: $resultat="c:\\resultat.txt"; open (RESULT, ">>$resultat"); not sure why the file existance check isn't working.. you might want to add some print statements, or maybe try and open

I need some help ...

2001-06-25 Thread perl
I want to do this : I have a file where there are 256 servers names, one server name per line. I want to read all lines to take the names of all servers to check the size of some files ... I tried this but it's not working like I want .. : $serveur="c:\\perl\\bin\\liste.txt"; open (SERV, "$ser

Re: Got a project for Perl but need some help

2001-05-02 Thread Michael Lamertz
Andrew Teo ([EMAIL PROTECTED]) wrote: > Just curious, how would you send an attachment? Get MIME::Lite from CPAN. -- If we fail, we will lose the war. Michael Lamertz | [EMAIL PROTECTED] / [EMAIL PROTECTED] Nordstr. 49 | http://www.lamertz.net 507

Re: Got a project for Perl but need some help

2001-05-01 Thread Kenny Gatdula
Hi, You may find the MacOSX list helpful. Here's the article announcing the list. http://use.perl.org/article.pl?sid=01/03/29/1452216&mode=thread&threshold= send a message to subscribe at [EMAIL PROTECTED] At 05:32 AM 5/1/2001 -0400, you wrote: >Hey guys, > >Thanks so much for your help. The s

Re: Got a project for Perl but need some help

2001-05-01 Thread Curtis Michelson
Hey guys, Thanks so much for your help. The supplied code was excellent. You Perl people are alright! :-) In answer to Johnathan Kupferer's question at to my computing platform, I'm actually working on a Mac g4 running Mac OS X and am very interested in testing out its Perl programming capabi

Re: Got a project for Perl but need some help

2001-04-30 Thread Johnathan Kupferer
Honestly, I've never had to. I would use Mail::Mailer except I don't see it with ActiveState's ppm. Its possible with Mail::Sendmail, looking at the source I see the note: Look at http://alma.ch/perl/Mail-Sendmail-FAQ.htm for additional info (CGI, examples of sending attachments, HTML mai

Re: Got a project for Perl but need some help

2001-04-30 Thread Timothy Kimball
: Just curious, how would you send an attachment? The MIME::Lite module can do this. -- tdk

Re: Got a project for Perl but need some help

2001-04-30 Thread Andrew Teo
Just curious, how would you send an attachment? Johnathan Kupferer wrote: > > Aww... you should have let him hire a consultant. ;o) > > Seriously though, this is dead simple. Gary's code is great and robust > if a bit intimidating for a newbie. You said you have background in > VisualBasic

Re: Got a project for Perl but need some help

2001-04-30 Thread Johnathan Kupferer
Aww... you should have let him hire a consultant. ;o) Seriously though, this is dead simple. Gary's code is great and robust if a bit intimidating for a newbie. You said you have background in VisualBasic and that would lead me to think you might be using windoze NT or 2000. (Unfortunately

Re: Got a project for Perl but need some help

2001-04-30 Thread Paul
--- Curtis Michelson <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a Perl newbie for sure. I recently subscribed to the list and > this is my first post. Welcome aboard. =o) > . . . > I'd like to try using Perl for a current client project. Situation > is this: > Web users need to hit an HTML fo

Re: Got a project for Perl but need some help

2001-04-30 Thread Gary Stainburn
Hi Curtis, this script is far from nice, but it works. A lot of it you could probably remove. The recipientlist enabled me to hide the email addresses inside the cgi. To improve it try looking at CPAN for mail handling routines. Gary __BEGIN__ #!/usr/bin/perl # # My varient of formmail. #

Got a project for Perl but need some help

2001-04-30 Thread Curtis Michelson
Hi, I'm a Perl newbie for sure. I recently subscribed to the list and this is my first post. My programming background is limited C and VisualBasic stuff. My regular focus is database development and I work a lot with Filemaker Pro. I also do some web devpt. as well. I'd like to try using Pe