I'd like to take a string and manipulate it in a few ways.
If the string is 34 characters or less, I'd like to append a colon
character and save it to $var1.
If the string is longer than 34 characters, I'd like to save up to 35
characters to $var1, but cut off at the last possible space
I have a number of emails I do for upper management, but the majority
of them travel and live off their BlackBerry. I am attempting to think out how
to present the data to them so that it lines up ( or at least attempts to line
up) for easier reading. I would still send the original
Thanks a lot for your explanation. For adding support of CGI, SSL and MySQL
in perl, what modules do i need to install. Please write down the commands
for installing and uninstalling and also for checking that what modules are
installed by default in perl as i have read the apache doccumentation
Hello all,
I am giving a presentation soon and will be talking a bit about perl.
I'd like to include an image about perl that describes it as the Swiss
army chainsaw. Ideally, I'd like to have a red chainsaw with the
white Swiss cross. Unfortunately, my Googling for images hasn't turn
anything
On 4/21/09 Tue Apr 21, 2009 8:58 AM, Grant emailgr...@gmail.com
scribbled:
I'd like to take a string and manipulate it in a few ways.
If the string is 34 characters or less, I'd like to append a colon
character and save it to $var1.
The length function will tell you how many characters
I'd like to take a string and manipulate it in a few ways.
If the string is 34 characters or less, I'd like to append a colon
character and save it to $var1.
The length function will tell you how many characters are in a string.
If the string is longer than 34 characters, I'd like to save
On 4/21/09 Tue Apr 21, 2009 10:46 AM, Grant emailgr...@gmail.com
scribbled:
Thanks guys. With some help I've come up with this:
$string = 'abc def ghi jkl mno pqr stu vwx yz';
if(length($string) = 34) {$var1 = $string.:;}
'=' is assignment, '==' is test for numerical equality. Change the
Thanks guys. With some help I've come up with this:
$string = 'abc def ghi jkl mno pqr stu vwx yz';
if(length($string) = 34) {$var1 = $string.:;}
'=' is assignment, '==' is test for numerical equality. Change the above
line to:
if( length($string) == 34 ) { $var1 = $string . ':' }
On 4/21/09 Tue Apr 21, 2009 11:16 AM, Grant emailgr...@gmail.com
scribbled:
$string =~ s/\s//g;
The above line deletes all of the spaces in $string. Is that what you want
to do?
All fixed up except for this. How can I remove only the spaces at the
end of $var1 and $var2 if they
$string =~ s/\s//g;
The above line deletes all of the spaces in $string. Is that what you want
to do?
All fixed up except for this. How can I remove only the spaces at the
end of $var1 and $var2 if they exist?
Anchor your substitution regular expression to the end of the string:
Thanks guys. With some help I've come up with this:
$string = 'abc def ghi jkl mno pqr stu vwx yz';
if(length($string) = 34) {$var1 = $string.:;}
'=' is assignment, '==' is test for numerical equality.
Change the above
line to:
if( length($string) == 34 ) { $var1 = $string .
Thanks guys. With some help I've come up with this:
$string = 'abc def ghi jkl mno pqr stu vwx yz';
if(length($string) = 34) {$var1 = $string.:;}
'=' is assignment, '==' is test for numerical equality.
Change the above
line to:
if( length($string) == 34 ) { $var1 =
On 4/21/09 Tue Apr 21, 2009 11:42 AM, Grant emailgr...@gmail.com
scribbled:
I'm trying to pull 35 or fewer characters to the nearest space
basically. This is what I have now:
if(length($string) = 34) {$var1 = $string.:;}
if(length($string) 34) {
($var1, $var2) = ($string =~
On 4/21/09 Tue Apr 21, 2009 11:54 AM, Grant emailgr...@gmail.com
scribbled:
if you have in $string = q[1234 12345 12 5346 12367 123 123678123];
Then $var1 will be '1234 12345 12 5346 12367 123 12367', but I thought you
wanted '1234 12345 12 5346 12367 123'?
Which one is the right one for
On Tue, Apr 21, 2009 at 12:37, Raheel Hassan raheel.has...@gmail.com wrote:
Thanks a lot for your explanation. For adding support of CGI, SSL and MySQL
in perl, what modules do i need to install. Please write down the commands
for installing and uninstalling and also for checking that what
Hi again.
I've managed to tidy up my code as much as possible, and attached is
where i stand at the moment.
If someone could take a look and help I would be extremely grateful.
I have hashed out sub week_day as I am totally stumped as to how to
solve that issue.
I'm not sure if resolving that
Hi all,
The get function in the libwww-perl library would be really useful to
me, but I'm having problems making it work. When I use it in a
cgi script (it's ultimate destination) it fails. My browser
displays a generic error message which isn't very helpful. Trying
to figure this out I ran a
On 4/21/09 Tue Apr 21, 2009 3:27 PM, hOURS h_o...@yahoo.com scribbled:
Hi all,
The get function in the libwww-perl library would be really useful to
me, but I'm having problems making it work. When I use it in a
cgi script (it's ultimate destination) it fails. My browser
displays a
I want foo() and bar() to do the same thing. One way to do this:
sub foo {return bar(@_);}
Is there a more clever way using \bar and things like that?
--
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new
I want to do function completion. If I have functions called where()
and which(), I want whe() to call where(), whi() to call which(), and
wh() to return something like Ambigious: where() and which() both
match wh().
What's the best/easiest way to do this?
--
We're just a Bunch Of Regular Guys,
On Tue, Apr 21, 2009 at 20:00, Kelly Jones kelly.terry.jo...@gmail.com wrote:
I want to do function completion. If I have functions called where()
and which(), I want whe() to call where(), whi() to call which(), and
wh() to return something like Ambigious: where() and which() both
match wh().
Kelly Jones wrote:
I want foo() and bar() to do the same thing. One way to do this:
sub foo {return bar(@_);}
Is there a more clever way using \bar and things like that?
$ perl -le'
use warnings;
use strict;
sub bar { print in sub bar: @_ }
bar 1, 2, 3;
sub foo { goto bar }
foo 4, 5, 6;
On Tue, Apr 21, 2009 at 20:12, Chas. Owens chas.ow...@gmail.com wrote:
On Tue, Apr 21, 2009 at 20:00, Kelly Jones kelly.terry.jo...@gmail.com
wrote:
I want to do function completion. If I have functions called where()
and which(), I want whe() to call where(), whi() to call which(), and
wh()
Thanks guys. With some help I've come up with this:
$string = 'abc def ghi jkl mno pqr stu vwx yz';
if(length($string) = 34) {$var1 = $string.:;}
'=' is assignment, '==' is test for numerical equality.
Change the above
line to:
if( length($string) == 34 ) {
if you have in $string = q[1234 12345 12 5346 12367 123 123678123];
Then $var1 will be '1234 12345 12 5346 12367 123 12367', but I thought you
wanted '1234 12345 12 5346 12367 123'?
Which one is the right one for what you are doing?
You're right, I would want:
1234 12345 12 5346 12367 123
On Tue, Apr 21, 2009 at 21:15, John W. Krahn jwkr...@shaw.ca wrote:
Kelly Jones wrote:
I want foo() and bar() to do the same thing. One way to do this:
sub foo {return bar(@_);}
Is there a more clever way using \bar and things like that?
$ perl -le'
use warnings;
use strict;
sub bar {
Please see below for my solution.
On Thu, Apr 16, 2009 at 3:52 PM, Dermot Paikkos
dermot.paik...@sciencephoto.co.uk wrote:
I am following these instructions,
http://www.ubuntugeek.com/how-to-install-apache2-webserver-with-phpcgi-a
27 matches
Mail list logo