Re: Debug Help Please

2008-07-03 Thread John W. Krahn
Andy wrote: Well Disregard the above script I made changes that I think were needed, but I still have no output in the .csv files You still have some of the same mistakes that were in the program the last time you posted it. Have you read my reply to your first posting yet? John -- Perl is

Re: Debug Help Please

2008-07-03 Thread Andy
Well Disregard the above script I made changes that I think were needed, but I still have no output in the .csv files #!/usr/bin/perl #use strict; #use warnings; #Define LogFiles my $dateroot="$ARGV[0]"; # Value should be 2-digit month my $outgoing="outgoing_xferlog.$dateroot.csv"; # This

Re: Integer data type

2008-07-03 Thread Roy M
Hi, On Jul 4, 9:53 am, [EMAIL PROTECTED] (Yitzle) wrote: > OK. That wasn't clear. Perl doesn't have an int and string and char > datatypes per say. Perl has a scalar and an array and a hash. > Perl does this dynamic casting to int or string as needed. Yes, but even for dynamic casting During ad

Re: Debug Help Please

2008-07-03 Thread John W. Krahn
Andy wrote: Greets Hello, I wrote this script to parse information from some log files. It Seems to work , or look like it works. In the end I get the log creation of .csv log files with no information. I am learning how to write this , I know there are tons of ways to do this. But My Boss m

Re: Integer data type

2008-07-03 Thread John W. Krahn
Roy M wrote: Conside the following codes: use POSIX; print LONG_MAX, "\n"; my $num = 994; print $num; Why $num is bigger than LONG_MAX ? Because the value in $num is a floating point number. perldoc perlnumber John -- Perl isn't a toolbox, but a small machine shop where you can

Re: removing '*' from *****STAFF*****

2008-07-03 Thread John W. Krahn
Nayab wrote: my $test = "*STAFF*"; if ($test =~ /(\*{1})(.*)(\*{1})/) { Could be more simply written as: if ($test =~ /\*(.*)\*/) { $test = $1; } John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short orde

Re: Integer data type

2008-07-03 Thread yitzle
On Thu, Jul 3, 2008 at 9:47 PM, yitzle <[EMAIL PROTECTED]> wrote: > On Thu, Jul 3, 2008 at 11:03 AM, Roy M <[EMAIL PROTECTED]> wrote: >> Conside the following codes: >> >> use POSIX; >> >> print LONG_MAX, "\n"; >> >> my $num = 994; >> print $num; >> >> >> Why $num is bigger than LONG_MAX ?

Re: Integer data type

2008-07-03 Thread yitzle
On Thu, Jul 3, 2008 at 11:03 AM, Roy M <[EMAIL PROTECTED]> wrote: > Conside the following codes: > > use POSIX; > > print LONG_MAX, "\n"; > > my $num = 994; > print $num; > > > Why $num is bigger than LONG_MAX ? It is a string maybe? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Debug Help Please

2008-07-03 Thread Andy
Greets I wrote this script to parse information from some log files. It Seems to work , or look like it works. In the end I get the log creation of .csv log files with no information. I am learning how to write this , I know there are tons of ways to do this. But My Boss made a decision to keep a

Integer data type

2008-07-03 Thread Roy M
Conside the following codes: use POSIX; print LONG_MAX, "\n"; my $num = 994; print $num; Why $num is bigger than LONG_MAX ? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: removing '*' from *****STAFF*****

2008-07-03 Thread Nayab
On Jul 3, 12:41 pm, [EMAIL PROTECTED] (Amit Saxena) wrote: > Hi Rajnikant, > > That removes the character "*" for everywhere whereas the requirement is > only to remove from the > beginning and trailing parts of the string. > > Regards, > Amit Saxena > > On Thu, Jul 3, 2008 at 11:19 AM, Rajnikant <

Re: regexp behin assertions ?

2008-07-03 Thread epanda
Sorry I hadn't enought time /(? Hi > > Where is a solution(s) of this thread? > > It's a litle bit weird ask for help, and don't offer a "posible solution". > > At least with a study case would be enough, don't mentioning further details. > > cheers -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: simplify a path

2008-07-03 Thread Rob Dixon
Brad Baxter wrote: > On Jul 2, 11:46 am, [EMAIL PROTECTED] (Rob Dixon) wrote: >> This seems to do the job. Hope it helps. >> >> Rob >> >> sub canonical_path { >> >> my $path = shift; >> my @path; >> >> foreach (File::Spec->splitdir($path)) { >> if ($_ eq '..') { >> if ($path[-1] eq

Re: simplify a path

2008-07-03 Thread Brad Baxter
On Jul 2, 11:46 am, [EMAIL PROTECTED] (Rob Dixon) wrote: > > This seems to do the job. Hope it helps. > > Rob > > sub canonical_path { > > my $path = shift; > my @path; > > foreach (File::Spec->splitdir($path)) { > if ($_ eq '..') { > if ($path[-1] eq '..') { > push @path, $

Re: Max range of rand function?

2008-07-03 Thread matt
On Jul 2, 10:04 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > howa wrote: > > On 7月2日, 下午11時59分, [EMAIL PROTECTED] (John W. Krahn) wrote: > >> howa wrote: > >>> Hi, > >> Hello, > > >>> I want to have a max range of rand function, so I use > >>> my $rnd = rand(4294967295) ; > >>> However, is it saf

Re: mysql data store in to a FILE

2008-07-03 Thread David Romero
Sorry, some correction for my own example old my $data = $dbh->selectall_arrayref("SELECT field1, field2 FROM table"); new my $data = $dbh->selectall_arrayref("SELECT field1, field2 FROM table",{Slice=>{}}); On Thu, Jul 3, 2008 at 9:52 AM, David Romero <[EMAIL PROTECTED]> wrote: > #!/usr/bin/pe

Re: @INC and cross-platform path usage

2008-07-03 Thread Gunnar Hjalmarsson
Jay Savage wrote: On Tue, Jul 1, 2008 at 11:30 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: Thomas Bätzler wrote: Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote: Some would suggest the use of the FindBin module. It does the right thing, but unfortunately it is known to be buggy. Actually,

Re: removing '*' from *****STAFF*****

2008-07-03 Thread Rob Dixon
Enigma wrote: > Manasi Bopardikar wrote: >> Does anyone know how do I remove the beginning and the trailing * from >> *STAFF* >> >> >> >> Thanks and Regards, >> >> Manasi Bopardikar|s/w Engineer|Persistent SystemsLtd >> >> (+91)(020)(30234497)|9767218759 >> >> [EMAIL PROTECTED] >> >> >

Re: play sounds

2008-07-03 Thread Jennifer G.
Thanks all for the good info. I have resolved the problem. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: substitution

2008-07-03 Thread epanda
It is ok I have found the good one substitution for me but I am amazing that perl is not as clever as vimscript regex in limitation of assertions. ex : perl is lost when I want to say that a digit has to not be preceed by this sentence : /(? epanda schreef: > > > I want to replace my pattern by t

Re: mysql data store in to a FILE

2008-07-03 Thread David Romero
#!/usr/bin/perl use strict; use DBI; ##Conect to database my $dbh = DBI->connect('string','user','password') or die "Can't connect to database"; #query my $data = $dbh->selectall_arrayref("SELECT field1, field2 FROM table"); #open file for append >>, # > for write # >> for append # Doc about

mysql data store in to a FILE

2008-07-03 Thread luke devon
Hi , I just tried to store some mysql-queried data in to a file. but it wont work. Actually i wanted to do not just writing , it should be APPEND at each time when that perl scripts runs. Can some body help me , if you all can provide me a sample or a example would be a great help Many than

Re: removing '*' from *****STAFF*****

2008-07-03 Thread Amit Saxena
Hi Rajnikant, That removes the character "*" for everywhere whereas the requirement is only to remove from the beginning and trailing parts of the string. Regards, Amit Saxena On Thu, Jul 3, 2008 at 11:19 AM, Rajnikant < [EMAIL PROTECTED]> wrote: > Try out this, > > my $stuff = '*STAFF*

RE: removing '*' from *****STAFF*****

2008-07-03 Thread Rajnikant
Try out this, my $stuff = '*STAFF*'; $stuff =~ s/\*//g; Print $stuff; Regards, Rajnikant Jachak -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 10:38 AM To: Perl Beginners Subject: Re: removing '*' from *STAFF* Manasi Bo