On Tue, Feb 7, 2012 at 3:19 PM, Jeff Peng wrote:
> 于 2012-2-7 15:07, lina 写道:
>
>> my $month = shift ;
>> my $year = shift ; here after shift the $year becomes
>> null?
>> http://perldoc.perl.org/functions/shift.html
>
>
>
> after shift the @_ becomes null. $year is 2007.
于 2012-2-7 15:07, lina 写道:
my $month = shift ;
my $year = shift ; here after shift the $year becomes null?
http://perldoc.perl.org/functions/shift.html
after shift the @_ becomes null. $year is 2007.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For addit
#!/usr/bin/perl
$month = "December";
$year = "2007" ;
header($month,$year);
sub header {
my $month = shift ;
my $year = shift ; here after shift the $year becomes null?
http://perldoc.perl.org/functions/shift.html
print "-" x 79, "\n" ;
print "$month
On Tue, Feb 7, 2012 at 12:49 PM, Parag Kalra wrote:
>
>
> On Mon, Feb 6, 2012 at 8:35 PM, lina wrote:
>>
>> until ($name eq "");
>> do {
>> print "Enter another name, or Enter to stop:\n" ;
>> $name = ;
>> chomp ($name);
>> push @namelist,$name;
>>
>> }
>>
>> print @na
On Mon, Feb 6, 2012 at 8:35 PM, lina wrote:
> until ($name eq "");
> do {
>print "Enter another name, or Enter to stop:\n" ;
>$name = ;
>chomp ($name);
>push @namelist,$name;
>
> }
>
> print @namelist
>
This should work. Also start using strict and warnings pragma
#/usr/bin/perl
until ($name eq "");
do {
print "Enter another name, or Enter to stop:\n" ;
$name = ;
chomp ($name);
push @namelist,$name;
}
print @namelist
$ ./generate_namelist.pl
./generate_namelist.pl: line 6: syntax error near unexpected token `;'
./gener
Hello,
I am trying to create a CMAC out of some JSON data (I have a reason for
doing this -- part of the authorization allowing my REST client to
communicate with a server that requires it). I figured I would use
Digest::CMAC to do this (but if someone knows a better way, please let me
know). Ho
Harry Putnam wrote:
I've been looking around, googling for a way to extract exif info from
images. There are many tools out there. But I wanted to fiddle with
the information in very specific ways.
I hit on the perl module: Image-ExifTool (Phil Harvey) on cpan.
However I am apparently badly mi
On Feb 6, 2012, at 1:42 PM, Steve Bertrand wrote:
> This may be easier. It uses the hash elements directly as an array, then uses
> grep to see if the zip code is within the specific state. It returns true if
> the state owns that zip code, and false if it doesn't.
>
> if ( grep( /^$customers_z
On Mon, Feb 6, 2012 at 3:14 PM, wrote:
>So I'm creating a hash of arrays that contains a list of Zip Codes
> for the United States. I've also written a foreach loop to access this
> hash but I'd like to see if it could be written better. For example, do I
> really need three foreach loo
On 02/06/2012 04:58 PM, Parag Kalra wrote:
On Mon, Feb 6, 2012 at 1:14 PM, wrote:
For example, do I really need three foreach loops?
You can get rid of third ForLoop for sure.
you don't actually lose the third loop. grep is an implied loop.
STATE: foreach my $state (keys %states
On 06/02/2012 21:14, sono...@fannullone.us wrote:
use strict;
use warnings;
my %states = (
AL => [ '350','351', ],
AK => [ '995','996', ],
AZ => [ '850','851', ],
AR => [ '716','717', ],
);
my $customers_state = 'AZ';
my $customers_zip = '850';
my $match = 'n
On Mon, Feb 6, 2012 at 1:14 PM, wrote:
>For example, do I really need three foreach loops?
>
>
>
You can get rid of third ForLoop for sure.
use strict;
use warnings;
my %states = (
AL => [ '350','351', ],
AK => [ '995','996', ],
AZ => [ '850','851', ],
AR => [ '
On 2012.02.06 16:14, sono...@fannullone.us wrote:
I have a web form where people enter their address info and I want to
make sure that the first three digits of their Zip Code correspond to their
State.
So I'm creating a hash of arrays that contains a list of Zip Codes for
the
I have a web form where people enter their address info and I want to
make sure that the first three digits of their Zip Code correspond to their
State.
So I'm creating a hash of arrays that contains a list of Zip Codes for
the United States. I've also written a foreach loop to
On Mon, Feb 6, 2012 at 6:59 AM, Harry Putnam wrote:
> I've been looking around, googling for a way to extract exif info from
> images. There are many tools out there. But I wanted to fiddle with
> the information in very specific ways.
>
> I hit on the perl module: Image-ExifTool (Phil Harvey) on
Dear List,
I'm having difficulties with the following:
Say you have a server program that listens on port 1234
The server handles requests and spawns a child process for every connection.
If a client sends the text "foo" to the server, the server itself should try to
make a connection with anot
I've been looking around, googling for a way to extract exif info from
images. There are many tools out there. But I wanted to fiddle with
the information in very specific ways.
I hit on the perl module: Image-ExifTool (Phil Harvey) on cpan.
However I am apparently badly misunderstanding the usa
That's what the documentation says:
...
$json = $json->canonical([$enable])
"If $enable is true (or missing), then the encode method will output JSON
objects by sorting their keys. This is adding a comparatively high
overhead".
...
So I guess you'd have to use something like that:
my $ret_json =
19 matches
Mail list logo