I've got an application which uses the format -mm-dd hh:mm:ss for its
timestamping. I'm trying to determine if the time a record was created was 5 or
more minutes before the time the script runs. Using DateTime->now I get a
timestamp of -mm-ddThh:mm:ss. I have no clue what the 'T' repres
I'm trying to create an array of hashes with hash names that are simply "user1",
"user2", "user3", etc. How do I use this method when adding one of the hashes
to the array?
my $user = "user" . $i;
(build hash...)
push @userData, hash
Would it be %$user? %{$user}? Some other variation on that
Chas Owens wrote:
> On 9/10/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>> I have a script which has to be manually edited to run for a span of days.
>> When
>> these days are over several weeks it can be clearly tedious to enter dates in
>> -mm-dd format.
erstein [mailto:[EMAIL PROTECTED]
> Sent: 10 September 2007 14:33
> To: 'Mathew Snyder'; 'Perl Beginners'
> Subject: AW: User input: dates spanning multiple months
>
> First I would use unix internal time format(epochen).
> And I would use Date-Calc (search.cpan.org/d
I have a script which has to be manually edited to run for a span of days. When
these days are over several weeks it can be clearly tedious to enter dates in
-mm-dd format. I've decided to set it up to ask for user input.
What I need is some input on is how to make it create the array for al
umber of elements.
>
> -Ursprüngliche Nachricht-----
> Von: Mathew Snyder [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 29. August 2007 13:32
> An: Perl Beginners
> Betreff: More Perl and AJAX
>
>
> When passing a value from JavaScript to a Perl script, am I right in
> thinking t
When passing a value from JavaScript to a Perl script, am I right in thinking
that the value received by the Perl script would be captured like my $value =
@_;?
I'm trying to pass a value to Perl and by calling it directly in the browser and
passing a value to it like so
http://ajax.application.c
Paul Lalli wrote:
> On Aug 27, 8:43 am, [EMAIL PROTECTED] (Mathew Snyder) wrote:
>> Let's forget for a moment that CGI::Ajax exists. Instead, imagine that all I
>> want to do is call a Perl script from my AJAX application. Having created
>> all
>> the necessary
Paul Lalli wrote:
> On Aug 27, 8:43 am, [EMAIL PROTECTED] (Mathew Snyder) wrote:
>> Let's forget for a moment that CGI::Ajax exists. Instead, imagine that all I
>> want to do is call a Perl script from my AJAX application. Having created
>> all
>> the necessary
Let's forget for a moment that CGI::Ajax exists. Instead, imagine that all I
want to do is call a Perl script from my AJAX application. Having created all
the necessary communication lines I then pass the script URL with the GET method
to the "line" in order to execute said Perl script.
All the
Chas Owens wrote:
> On 8/21/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
> snip
>> It would appear that for all but the first iteration, this is happening.
>> However, something during the first time through seems to cause the flag to
>> not
>> be what it sho
Chas Owens wrote:
> On 8/20/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>> Paul Lalli wrote:
>>> On Aug 20, 3:10 pm, [EMAIL PROTECTED] (Mathew Snyder) wrote:
>>>> I run a script which creates a small report for different users of a
>>>> system we
Paul Lalli wrote:
> On Aug 20, 3:10 pm, [EMAIL PROTECTED] (Mathew Snyder) wrote:
>> I run a script which creates a small report for different users of a system
>> we
>> have here at work. The report is a simple text document formated with, of
>> all
>> things
I run a script which creates a small report for different users of a system we
have here at work. The report is a simple text document formated with, of all
things, the format function. It uses a TOP to create a header for each of our
customers which a user has worked with. For some reason the f
Tom Phoenix wrote:
> On 8/15/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>
>> How would I go about sub-listing something. For instance, if I have a work
>> order that has been worked on during different days, I want to list the work
>> order once and each day belo
How would I go about sub-listing something. For instance, if I have a work
order that has been worked on during different days, I want to list the work
order once and each day below it. It would look like this:
Ticket ID SubjectDate hh:mm
John W. Krahn wrote:
> Mathew Snyder wrote:
>> I need to populate a select multiple on a web page when it loads with
>> a series
>> of values. Most of the values will be determined dynamically when the
>> code runs
>> but some are static. They look like &quo
I need to populate a select multiple on a web page when it loads with a series
of values. Most of the values will be determined dynamically when the code runs
but some are static. They look like "A - H", "I - P" and "Q - Z". The spaces
are for readability.
What I am doing is declaring an array
Tom Phoenix wrote:
> On 7/2/07, Mathew <[EMAIL PROTECTED]> wrote:
>
>> foreach my $date (@searchDate) {
>> while (my $ticket = $tix->Next) {
>
> Seeing this worries me. I don't know enough about what's going on to
> tell whether it's wrong or not, but it looks wrong. When the outer
> loop
Tom Phoenix wrote:
> On 7/2/07, Mathew <[EMAIL PROTECTED]> wrote:
>
>> foreach my $date (@searchDate) {
>> while (my $ticket = $tix->Next) {
>
> Seeing this worries me. I don't know enough about what's going on to
> tell whether it's wrong or not, but it looks wrong. When the outer
> loop
I have a script which places data 4 levels deep in a HoHoHoH. It grabs tickets
in our ticket system using the systems API and places attributes about each
piece of activity into the hash. The has is called %tickets. It looks like
$tickets{action_creator}{ticket_customer}{ticket_number}{ticket_su
Does anyone know what the best route to creating graphs using AJAX and Perl
would be? I've been running various searches on this and haven't found any
solid information on how to make this happen.
Thanks
Mathew
--
Keep up with me and what I'm up to: http://theillien.blogspot.com
--
To unsubscr
Mumia W. wrote:
> On 06/28/2007 10:22 PM, Mathew Snyder wrote:
>>
>> I'm getting a strange bit of behaviour. I have everything set up
>> right and my dates are getting made up properly however, one sub which
>> creates the searchDate array isn't being called
Paul Johnson wrote:
> On Thu, Jun 28, 2007 at 06:58:36AM -0500, Mumia W. wrote:
>
>> On 06/28/2007 03:00 AM, Mathew Snyder wrote:
>>> our @ISA = qw(Exporter);
>>> our @EXPORT = qw(startDate endDate searchStart searchEnd);
>>> our $VERSI
Paul Johnson wrote:
> On Thu, Jun 28, 2007 at 06:58:36AM -0500, Mumia W. wrote:
>
>> On 06/28/2007 03:00 AM, Mathew Snyder wrote:
>>> our @ISA = qw(Exporter);
>>> our @EXPORT = qw(startDate endDate searchStart searchEnd);
>>> our $VERSI
Brad Baxter wrote:
> On Jun 14, 10:22 pm, [EMAIL PROTECTED] (Mathew Snyder) wrote:
>> I fixed all of the bugs save one. I can't access any of my subroutines
>> without
>> explicitly using it with dates_emails::subroutine. I was under the
>> impression
>>
Chas Owens wrote:
> On 6/22/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
> snip
>> I'm not sure what you mean by "Change your new() in a new() and init()".
> snip
>> What do you mean by "set/get approach"?
> snip
>
> Some people believe
You'll notice in the section that creates the filehandle I have a statement that
says "next if $address =~ m/^#/gmx;". I had to escape the "#". Can anyone tell
me why that is? It isn't a special character for regexes that I've ever seen
used.
Thanks,
Mathew
--
Keep up with me and what I'm up
I have a script that queries a database, grabs a bunch of email addresses from
it and generates a procmail ruleset for each of them. It also opens a file
which contains additional email address and reads them into an array:
open AUTHFILE, "connect("dbi:Pg:dbname=xx;host=10.0.2.30", "x", "
Dr.Ruud wrote:
> Mathew Snyder schreef:
>
>> I'm presently learning OOP as Perl does it using online resources and
>> and Programming Perl as my tutors. I'm not certain I have it right
>> though. Is this correct for the package:
>
> [whitespace is che
I'm presently learning OOP as Perl does it using online resources and and
Programming Perl as my tutors. I'm not certain I have it right though. Is this
correct for the package:
package Report;
require Exporter;
use strict;
our @ISA = qw(Exporter);
our @EXPORT= qw(new);
sub new {
It looks like an object is what I want. Am I correct? Suppose I need to work
with a bit of data that actually has 11 attributes. This would be an object of
another type. However, I need to manipulate pieces of it differently. So I'm
guessing I would create an object thusly:
sub objectname {
I'm probably going to be doing some work with data that would, based on what I
already know of Perl, require me to create something along the lines of a
HoHoHoHoHoHoHoHoH...not exactly representative but you get the idea.
Is there a way to handle data with a lot of attributes other than creating a
Mumia W. wrote:
> On 06/17/2007 12:36 AM, Mathew Snyder wrote:
>> [...]
>> In the debugger I've set the 'w' command to watch the variable
>> containing the
>> day being looked for ($day). I would have thought $day stays the same
>> throught
>>
I'm trying to figure out what exactly a script I wrote (see the attachment) is
doing by stepping through it in the debugger. I have an array of dates in
%Y-%m-%d format for each of the last 7 days. So, for instance, the range of
dates for today (June 17, 2007) is from the 10th to the 16th. I the
;
> try:
>
> use lib "/usr/local/bin/lib/";
> use dates_email;
>
> HTH Martin
>
> On Thu, 14 Jun 2007 01:50:57 -0400
> Mathew Snyder <[EMAIL PROTECTED]> wrote:
>
>> To take this further I've changed the code. It now looks like thi
Sure enough. I must have typo'ed it before. Now it works just like you say it
should.
Thanks
Mathew
Keep up with me and what I'm up to: http://theillien.blogspot.com
Chas Owens wrote:
> On 6/14/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>> I did this and set $Data
I did this and set $Data::Dumper::Useqq = 1; this was the result:
$VAR1 = {
"" => 7,
};
Nothing there. Does this mean I just have an empty string with neither a NUL
value or anything else for that matter (physicists would be boggled ;) )?
Mathew
Keep up with me and what I'm up
I'm building a hash using values from a database backend to an application we
use in house. The application has a field which contains a customer name. This
values is supposed to be set by the person handling the work but sometimes
doesn't get done. This leaves a NULL value in the database which
HTH Martin
>
> On Thu, 14 Jun 2007 01:50:57 -0400
> Mathew Snyder <[EMAIL PROTECTED]> wrote:
>
>> To take this further I've changed the code. It now looks like this:
>>
>> package dates_emails;
>> require Exporter;
>> use strict;
>
To take this further I've changed the code. It now looks like this:
package dates_emails;
require Exporter;
use strict;
our @ISA = qw(Exporter);
our @EXPORT = qw(startDate, endDate, searchStart, searchEnd);
our @EXPORT_OK = qw($emailTo, $emailFrom, $emailBcc);
our %EXPORT_TAGS = {
All I'm looking to do is simplify the creation of several scripts which will use
the same bit of code. I've read through the section in Programming Perl for
creating my own modules and have what I think is a functioning module.
package dates_email;
require Exporter;
our @ISA = qw(Exporte
28;
}
Determine if the month requested has 31, 30 or 28 days and build
# our days array to match
if (exists($months31{$month})){
while ($count <= 31) {
push @days, (sprintf '%02d', $count);
$count++;
}
}elsif (exists($months30{$month})
A while ago I had posted requesting help with a long block of code that would do
all kinds of stuff dealing with the date. It turned out to not work despite
being technically, correct. Instead of getting help with it, Mr. Phoenix
provided me with a block of code that did what I needed but much mo
I have a trouble ticket application that uses a regex to find a piece of
information in an incoming email and auto populate a field if it is found. The
line it will be looking for is
CUSTOMER ENVIRONMENT customer_name
where customer_name will never have a space making it one word. If I just want
I'm passing two hash references into a subroutine. One hash is in the format of
$dept{$env}{$user}. This contains an amount of time spent by each user on a
customer ($env). The second hash is in the format of
$ticCount{$env}{$user}{$ticID}. This contains a running count of how many times
a user
Is it possible to use too many comments? I'm looking at a script I wrote and
think I may have made it less clear by trying to make it more clear.
--
Keep up with me and what I'm up to: http://theillien.blogspot.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [
That's waaay over my head. The method I used works so I'll stick with that.
Thanks though. :)
Keep up with me and what I'm up to: http://theillien.blogspot.com
Chas Owens wrote:
> My understanding of the problem:
>
> You have a ref to a HoH and you need to find all of the first set of
>
MAIL PROTECTED] wrote:
> Hi again,
>
> In that case can use the following:
> if ($dept and exists($dept->{customer}{user}){ }else{....}
>
> Yaron Kahanovitch
> - Original Message -
> From: "Mathew Snyder" <[EMAIL PROTECTED]>
> To: [EMAIL PROT
t; I am not sure that I understand your problem.
> In General if you want to check the existence of the key "user" in the first
> hash, you can use the following
> if ($dept and exists($dept->{user}){ }else{}
>
>
> Hope that helps
>
>
> Yaron
gt; Hope that helps
>
>
> Yaron Kahanovitch
> - Original Message -
> From: "Mathew Snyder" <[EMAIL PROTECTED]>
> To: "Perl Beginners"
> Sent: Sunday, May 13, 2007 9:54:38 AM (GMT+0200) Auto-Detected
> Subject: Stuck on a hash referrence,
A subroutine I'm working on takes two hash references. The hashes are each
actually a HoH.
timesheet(\%opsTotal, \%opsEnvTotal);
The problem I'm having is that I need to look past the first hash and into the
second for the existence of a particular key. I'm not sure how to go about
doing this.
HEET "\n";
printf TIMESHEET "%18s\n\n", "$env->{$environ}";
}
close TIMESHEET;
}
Does that look right?
Mathew
Keep up with me and what I'm up to: http://theillien.blogspot.com
Chas Owens wrote:
> On 5/12/07, Mathew Snyder
When passing two hashes into a subroutine how do I use them separately if they
are placed into one flat list?
Mathew
--
Keep up with me and what I'm up to: http://theillien.blogspot.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.
John W. Krahn wrote:
> Mathew Snyder wrote:
>> Thanks for enlightening me about 'format'
>>
>> I've run your example code from the command line and got exactly the results
>> you
>> did (not that I'd expect to get anything different ;) ).
John W. Krahn wrote:
> Mathew Snyder wrote:
>> Question regarding the text formatting modules out there. I've found three
>> on
>> CPAN that seem to have the functionality that I'm looking for but I don't
>> know
>> which would best suit my n
Hello all.
Question regarding the text formatting modules out there. I've found three on
CPAN that seem to have the functionality that I'm looking for but I don't know
which would best suit my needs. The three are Text::Format, Text::Wrapper and
Text::Autoformat.
I have a script which populates
Thanks for all the input.
I've found that the program puts most of its files in one location and only a
few in one other. I don't actually need to worry about this anymore as the tar
command isn't as long as I thought it would be.
Mathew
Mathew Snyder wrote:
> I have be
unfortunately, no. It has predetermined file locations spread across the drive
Mathew
Rodrick Brown wrote:
> On 5/3/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>> I have been given a task of installing a piece of backup software,
>> then tarring
>> up all of the a
I have been given a task of installing a piece of backup software, then tarring
up all of the associated files in order to automate the installation onto other
machines. The only way I can think of doing this is to do an ls -l on / and
then doing a diff after the installation and manually adding t
Chad Kemp wrote:
> Mathew,
>
>try to test every condition going INTO the hash (or hashes) before
> you actually assign a value to a key. as mentioned earlier, hashes must
> be key/value pairs. the key will auto-vivify if a key is "new" but only
> if a corresponding value accompanies it. whe
Rob Dixon wrote:
> It's very unclear what you're trying to do, and what your RT package
> does. Let
> me make some observations and guesses and you can tell me where I'm
> right or
> wrong.
>
> $tix is an iterator that will return a sequence of tickets through the Next
> method.
>
> $ticket is a
Chas Owens wrote:
> On 3/21/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
> snip
>> my %customer = ${customer};
> snip
>
> Hashes cannot be created with only one value, they must always be in
> pairs: key and value. If $customer has a type of HASH (you ca
Rob Dixon wrote:
> Mathew Snyder wrote:
>>
>> I have a problem printing out a hash. This is the script I'm working
>> with:
>> #!/usr/bin/perl
>>
>> use warnings;
>> use strict;
>> use lib '/usr/local/rt-3.6.3/lib';
>>
Chas Owens wrote:
> On 3/20/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
> snip
>> $timeworked =
>> $env{$transaction->Creator}{$transaction->TimeTaken};
> snip
>
>> From this line you can see that %env is a HoH (hash of hashes). This
&g
Rob Dixon wrote:
> Mathew Snyder wrote:
>>
>> I have a problem printing out a hash. This is the script I'm working
>> with:
>> #!/usr/bin/perl
>>
>> use warnings;
>> use strict;
>> use lib '/usr/local/rt-3.6.3/lib';
>>
Jeff Pang wrote:
>> Jeff Pang wrote:
foreach my $key (keys %$env) {
print $key . " -> " . $env{$key} . "\n";
}
>>> Hello,
>>>
>>> For a quick look,the codes above may not work.
>>> Since $env is a hash reference,so you can't say $e
Jeff Pang wrote:
>>foreach my $key (keys %$env) {
>>print $key . " -> " . $env{$key} . "\n";
>>}
>
> Hello,
>
> For a quick look,the codes above may not work.
> Since $env is a hash reference,so you can't say $env{$key} to access the
> hash
Also, I've read the *perldsc* perldoc and it didn't help undo my confusion.
Mathew
Mathew Snyder wrote:
> I have a problem printing out a hash. This is the script I'm working with:
> #!/usr/bin/perl
>
> use warnings;
> use strict;
> use lib '/usr/local/r
Also, I've read the *perldsc* perldoc and it didn't help undo my confusion.
If we don't protect the freedom of speech, how will we know who the assholes
are?
http://theillien.blogspot.com
Mathew Snyder wrote:
> I have a problem printing out a hash. This is the script I'm
I have a problem printing out a hash. This is the script I'm working with:
#!/usr/bin/perl
use warnings;
use strict;
use lib '/usr/local/rt-3.6.3/lib';
use lib '/usr/local/rt-3.6.3/local/lib';
use RT;
use RT::Tickets;
RT::LoadConfig();
RT::Init();
my $tix = new RT::Tickets(RT::SystemUser);
$tix
Thanks. That's what I thought it was doing but wasn't sure.
Mathew
John W. Krahn wrote:
> Mathew Snyder wrote:
>> my $timeworked = {};
>
> In this context they represent an anonymous hash, the reference of which is
> assigned to the scalar variable. It is usua
my $timeworked = {};
Mathew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Tom Phoenix wrote:
> On 2/20/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>
>> shredder --force --plugin 'Tickets=arg1,desc;arg2,desc;arg3,desc'
>>
>> I can see that the system call would look like
>> system("shredder","--force",
I have a script that uses 'system' to call an external command that has a long
list of arguments. I understand that I can use 'system' with a list of
parameters and arguments the first being the command to call and the following
to be the arguments for the command. I'm wondering though, what I sh
Rob Dixon wrote:
> Mathew Snyder wrote:
>> Tom Phoenix wrote:
>>> On 2/9/07, Mathew <[EMAIL PROTECTED]> wrote:
>>>
>>>> I'm running this as a cron job 1 minute after midnight on Saturday
>>>> nights (Sunday morning) so as to cover all
Owen wrote:
> On Sun, 11 Feb 2007 03:18:00 -0500
> Mathew Snyder <[EMAIL PROTECTED]> wrote:
>
>> Tom Phoenix wrote:
>>> On 2/9/07, Mathew <[EMAIL PROTECTED]> wrote:
>>>
>>>> I'm running this as a cron job 1 minute after midnight
Jeff Pang wrote:
>> #!/usr/bin/perl
>>
>> use warnings;
>> use strict;
>>
>> my @date = (localtime (time - (24*60*60)))[3..5];
>>
>> foreach my $i (@date) {
>>print $i . "\n";
>> }
>>
>> exit;
>>
>> I get this:
>>
>> 10
>> 1
>> 107
>>
>>
>> I still have to add 1 to the month. Is that r
Tom Phoenix wrote:
> On 2/9/07, Mathew <[EMAIL PROTECTED]> wrote:
>
>> I'm running this as a cron job 1 minute after midnight on Saturday
>> nights (Sunday morning) so as to cover all of Saturday back through the
>> previous Sunday. Does your suggestion mean I'd have to run it late
>> Sunday nigh
ndant.
Thanks,
Mathew
Adriano Ferreira wrote:
> On 2/8/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>> Does this look like it *should* work?
>>
>> while ($data->get_tag("small")) {
>> my $email = $data->get_trimmed_text("/small")
rry about those two addresses
outside of the users.
Adriano Ferreira wrote:
> On 2/2/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
>> I have a script which extracts email addresses from a web page, pushes
>> them into
>> an array and then prints them out before asking if
I have a script which is supposed to query a database and compile data for every
day of the week prior to when it runs. I thought I had set it so that if the
first of a month falls in the middle of the week it would roll the month back to
the previous one after all the data for the first is gather
I have a script which extracts email addresses from a web page, pushes them into
an array and then prints them out before asking if I wish to perform the work on
them that is required.
What I would like to do is compare the username portion of the email address to
a list of usernames in a hash to
Rob Dixon wrote:
> Mathew Snyder wrote:
>> Rob Dixon wrote:
>>> Mathew wrote:
>>>> I have a file with a list of subfolders. The list was created using
>>>> dir
>>>> and each entry is like thus:
>>>>
>>>> 12/12/2005 0
Rob Dixon wrote:
> Mathew wrote:
>> I have a file with a list of subfolders. The list was created using dir
>> and each entry is like thus:
>>
>> 12/12/2005 04:38 AM A Perfect Circle
>>
>> I then created a simple script that I hoped would eliminate everything
>> prior to the last bit
Jeff Pang wrote:
>> If I have 'my $aryRef = [EMAIL PROTECTED]' can do 'push $aryRef, $aValue'?
>> Does this
>> place the value of $aValue directly into @array or do I need to figure out
>> another way to do that?
>>
>
> You can't do 'push' like this way since $aryRef is a scalar but 'push' expec
Quick question about references to arrays that I need clarified?
If I have 'my $aryRef = [EMAIL PROTECTED]' can do 'push $aryRef, $aValue'?
Does this
place the value of $aValue directly into @array or do I need to figure out
another way to do that?
I'm guessing this is exactly what array refere
beast wrote:
> I have these following data:
>
> a 100
> a 102
> c 100
> a 102
> b 111
> c 100
> c 102
> c 100
> c 100
> a 102
> ...
>
> I would like to have a list (either array or hash) with unique line .
> Any help would appreciated.
> Thanks.
>
>
>
The way I would do it is to place the init
John W. Krahn wrote:
> Mathew Snyder wrote:
>> A script I've been working on will provide time spent on a work ticket in
>> H:MM
>> format. However, if the MM section is less than 10 it only shows as H:M so I
>> need to append a 0 to it. So, for instance, if the
A script I've been working on will provide time spent on a work ticket in H:MM
format. However, if the MM section is less than 10 it only shows as H:M so I
need to append a 0 to it. So, for instance, if the output looks like this 9:7 I
need to append the 0 to the 7 making it 9:07.
The output is
Dr.Ruud wrote:
> Ken Foskey schreef:
>> Mathew Snyder:
>
>>> Is there an easy way to determine if an item is in an array without
>>> iterating through the array and comparing each element to the item
>>> in question?
>> Look up grep.
>
> That
Nevermind. I replaced the for loop with a while loop and it eliminated the
problem.
Mathew
Mathew Snyder wrote:
> In the following snippet of code I'm getting the "useless use of a private
> variable in a void context" error. It is at line 64 which is the closing
>
In the following snippet of code I'm getting the "useless use of a private
variable in a void context" error. It is at line 64 which is the closing brace
for the for loop.
for ($count; $count < 7; $count++) {
if ($day == '01') {
if (exists($months31{$month})){
Is there an easy way to determine if an item is in an array without iterating
through the array and comparing each element to the item in question?
Mathew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Chad Perrin wrote:
> On Fri, Dec 29, 2006 at 11:36:25PM -0500, Mathew Snyder wrote:
>> I'm trying to set up an if clause to exit if an answer given is anything but
>> either any case combination of 'y' or 'yes'. This is what I have:
>>
>> exit
Ken Foskey wrote:
> On Fri, 2006-12-29 at 23:36 -0500, Mathew Snyder wrote:
>> I'm trying to set up an if clause to exit if an answer given is anything but
>> either any case combination of 'y' or 'yes'. This is what I have:
>>
>> exit if $ans
Ken Foskey wrote:
> On Fri, 2006-12-29 at 23:36 -0500, Mathew Snyder wrote:
>> I'm trying to set up an if clause to exit if an answer given is anything but
>> either any case combination of 'y' or 'yes'. This is what I have:
>>
>> exit if $ans
Ken Foskey wrote:
> On Fri, 2006-12-29 at 23:36 -0500, Mathew Snyder wrote:
>> I'm trying to set up an if clause to exit if an answer given is anything but
>> either any case combination of 'y' or 'yes'. This is what I have:
>>
>> exit if $ans
I'm trying to set up an if clause to exit if an answer given is anything but
either any case combination of 'y' or 'yes'. This is what I have:
exit if $ans =~ m/[^y|^yes]/i;
Will that do what I want?
Mathew
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Mumia W. wrote:
> On 12/21/2006 10:53 PM, Mathew Snyder wrote:
>> I have a script which will determine which modules need to be
>> installed for a
>> certain application. It will take all of the module names and iterate
>> through
>> them installing each as su
1 - 100 of 147 matches
Mail list logo