I have to add a variable value to an array, something like this:
......
@my_array_name = $value_of_this_variable;
This doesnt seem to work, any ideas why?
Thanks! (4 Replies)
i have a file called file.txt having the following entries.
2321
2311
2313
4213
i wnat to store these values in a list and i want to iterate the list using loop and store it in another list (1 Reply)
Hi,
Is there an easy way to simulate following Perl code in Bash.
if ( grep {$my_value eq $_} @ARGV ){
print "Do Something\n";
} else {
die "Invalid value";
} (0 Replies)
Hi,
cut -d: -f1,3 /etc/group >rpt.out
I have a doubt in perl. right i am getting list of group user id into rpt.out file. instead i need to store it as an array in perl script. could you please tell me how can i get list of user into an array in perl script..
thanks in advance. (1 Reply)
Hi,
I have 2 arrays:
@names=qw(amith veena chaitra);
@files=qw(file.txt file1.txt file3.txt);
There is one to one relationship between names and files.
There needs to be mapping created between names and files.
The output should be like this:
amith --> file.txt
veena --->... (3 Replies)
Hi,
i want to search and replace array values by using perl
perl -pi -e "s/${d$i]}/${b$j]}" *.xml
i am using while loop for the same. if i excute this,it shows "Substitution replacement not terminated at -e line 1.".
please tell me what's wrong this line (1 Reply)
I have 2 files , i need compare both files field by field, and in the fourth field some value will be interchaged and some value will be **.
ex: file1 john|0.0|4|**:25;JP:50;UY:25
file2 john|0.0|4|JP:50;**:25;UY:25 (4 Replies)
I know that
@food = %fruit;
Works. But how do I assign %fruit and %veggies to @food ? (2 Replies)
Discussion started by: popeye
2 Replies
LEARN ABOUT DEBIAN
sms::send::test
SMS::Send::Test(3pm) User Contributed Perl Documentation SMS::Send::Test(3pm)NAME
SMS::Send::Test - SMS::Send International-Class Testing Driver
SYNOPSIS
# Create a testing sender
my $send = SMS::Send->new( 'Test' );
# Clear the message trap
$send->clear;
# Send a message
$send->send_sms(
text => 'Hi there',
to => '+61(4) 1234 5678',
);
# Get the message from the trap
my @messages = $send->messages;
DESCRIPTION
SMS::Send supports two classes of drivers.
An international class named in the format "SMS::Send::Foo", which only accept international numbers in "+1 XXX XXXXX" format, and
regional-context drivers in the format "SMS::Send::XX::Foo" which will also accept a non-leading-plus number in the format applicable
within that region (in the above case, Australia).
SMS::Send::Test is the testing driver for the international class of drivers. Except for the name, it is otherwise identical to
SMS::Send::AU::Test.
Its two roles are firstly to always exist (be installed) and secondly to act as a "trap" for messages. Messages sent via SMS::Send::Test
always succeed, and the messages can be recovered for testing after sending.
Note that the trap is done on a per-driver-handle basis, and is not shared between multiple driver handles.
METHODS
SMS::Send::Test inherits all the methods of the parent SMS::Send::Driver class, and adds the following.
messages
The "messages" method retrieves as a list all of the messages in the message trap.
clear
The "clear" method clears the message trap. This should be done before each chunk of test code to ensure you are starting from a known
state.
Returns true as a convenience.
SUPPORT
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SMS-Send>
For other issues, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2005 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.14.2 2011-11-09 SMS::Send::Test(3pm)