You may want to chomp the line to remove the newline character.
After' my $line = $_;' add:
chomp $line;
On Wed, Dec 9, 2009 at 10:16 PM, Majian wrote:
> Hi ,all :
>
> I'd like to convert binary file intohex , but when I use perl's built
> in functions I keep getting extra bits on the end
Hi ,all :
I'd like to convert binary file intohex , but when I use perl's built
in functions I keep getting extra bits on the end.
cat bin_file
11100010
0001010100111110
My perl script is the following :
#!/usr/bin/perl
use strict;
while (<>){
Rafa? Pocztarski wrote:
I forgot to cc: the list...
2009/12/10 Noah :
I am hoping to figure out the best Way to write something. Â I have two
arrays @previous_hostnames and @hostnames.
I want to figure out if there is at least one matching element in
@previous_hostnames that is found in @hostn
2009/12/6 Parag Kalra :
> I have only interacted with PHP/MySQL to design a website.
>
> I wanted to know if it is possible to use Perl instead of PHP (and I am
> pretty sure it should be possible :) ). But my main concern is what are the
> main Pros & Cons of using Perl instead of PHP.
Hi,
While
On 12/9/09 Wed Dec 9, 2009 6:01 PM, "Tony Esposito"
scribbled:
> I need to pass an command-line arg that is a string which contains the '@'.
> Is there any way to do this and also 'tell' Perl not to interpret this as
> other than a '@' character?
The '@' character is only special in Perl sourc
> "N" == Noah writes:
N> Hi there,
N> I am hoping to figure out the best Way to write something. I have two
N> arrays @previous_hostnames and @hostnames.
N> I want to figure out if there is at least one matching element in
N> @previous_hostnames that is found in @hostnames.
N>
> "AHA" == Alan Haggai Alavi writes:
>> Hello,
>>
>> I would like to have someone looking over my script, which is a basic
>> frontend for playing radio with mplayer. In particular, I'm wondering how I
>> could get rid of all those elsif's when parsing the arguments; as you can
>
I need to pass an command-line arg that is a string which contains the '@'. Is
there any way to do this and also 'tell' Perl not to interpret this as other
than a '@' character?
Thx.
I forgot to cc: the list...
2009/12/10 Noah :
> I am hoping to figure out the best Way to write something. I have two
> arrays @previous_hostnames and @hostnames.
>
> I want to figure out if there is at least one matching element in
> @previous_hostnames that is found in @hostnames.
You can use
Noah wrote:
Hi there,
Hello,
I am hoping to figure out the best Way to write something. I have two
arrays @previous_hostnames and @hostnames.
I want to figure out if there is at least one matching element in
@previous_hostnames that is found in @hostnames.
my $found = map { my $x = $_;
Hi there,
I am hoping to figure out the best Way to write something. I have two
arrays @previous_hostnames and @hostnames.
I want to figure out if there is at least one matching element in
@previous_hostnames that is found in @hostnames.
What about finding all matching elements.
I suppose
On Dec 9, 7:01 am, tony1234567...@yahoo.co.uk (Tony Esposito) wrote:
> I need to get the current USER env var in a Windows Perl program. Does
> anyone know how this is done? I have done it on UNIX/Linux.
>
> Thx.
perl -e "print $ENV{'USERNAME'}"
--
To unsubscribe, e-mail: beginners-unsubscr..
From: Tony Esposito
> I need to get the current USER env var in a Windows Perl
> program. Does anyone know how this is done? I have done
> it on UNIX/Linux.
I believe it is labeled USERNAME in the MS-Windows environment.
Bob McConnell
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.or
I need to get the current USER env var in a Windows Perl program. Does anyone
know how this is done? I have done it on UNIX/Linux.
Thx.
Thanks to all. I abandoned MIME::Lite in favor Mail::Sender and got it to work
fine.
From: Philip Potter
To: "beginners@perl.org"
Sent: Wed, 9 December, 2009 6:06:01
Subject: Re: Email does not send attachment ...
2009/12/9 Sneed, Sean P :
> Try the paths li
2009/12/9 Sneed, Sean P :
> Try the paths like this C:\\my_file.log
Is there a reason that you suggested this? Perl under Windows, just
like C and C++ under Windows, accepts / as a directory separator just
fine. And if you stick to using / as your directory separator, porting
to unix-based systems
Hi,
index $s, "e", 3;
This means "position of the first 'e' on or after position 3". The position of
the 'e' is counted from the start of the string. Counting starts from 0.
Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
--
To unsubscribe, e-mail: beginners-unsubscr...@p
>Hello,
>
>I would like to have someone looking over my script, which is a basic
>frontend for playing radio with mplayer. In particular, I'm wondering how I
>could get rid of all those elsif's when parsing the arguments; as you can
>see, there's lots of them, and I suspect that there's a better wa
Try the paths like this C:\\my_file.log
-Original Message-
From: Robert H [mailto:sigz...@gmail.com]
Sent: Tuesday, December 08, 2009 6:58 PM
To: beginners@perl.org
Subject: Re: Email does not send attachment ...
On 12/8/09 3:56 PM, Tony Esposito wrote:
> Hello,
>
> I am using Per
On Dec 8, 12:56 pm, tony1234567...@yahoo.co.uk (Tony Esposito) wrote:
> Hello,
>
> I am using Perl 5.8 on WindowsXP and Windows Server 2003. I can not get the
> following attachment to arrive/attach even though I get the email with no
> issues. Any ideas?
>
> ...
>
> MIME::Lite->send('smtp',
On Dec 8, 12:08 am, an...@melerit.se (Anders Hartman) wrote:
> Hello,
>
> I which to use eval to execute subroutines dynamically.
>
> The following code snippet fails:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> sub asub {
> our $abc;
> print $abc;
>
> }
>
> my $abc = "abc\n";
> e
On Dec 7, 9:11 pm, perl...@gmail.com (Perl Pra) wrote:
> Hi All,
>
> I have done the following.
>
> printed the cmd variable and check what actually got passed. If I copy paste
> the printed command on dos prompt it worked fine.
>
> I think its not intallation issues as I could execute the command
> It removes all singly occurring newlines.
>
> This is a negative, zero-width, look-behind assertion (? means that the variable does not match what it contains, in this case a
> newline, before the match but do not include what it matches in the match.
>
> This is a negative, zero-width, look-ahe
2009/12/9 Robert H :
> On 12/8/09 3:56 PM, Tony Esposito wrote:
>>
>> Hello,
Hi
>> use MIME::Lite;
>> use Net::SMTP;
>>
>> unless (-e 'C:/my_file.log'&& -s 'C:/my_file.log' ) { print "file not
>> found\n"; }
>>
>> my $msg = MIME::Lite->new (
>> From => 'my_em...@yahoo.com',
>> To =
2009/12/9 John W. Krahn :
> Jeff Pang wrote:
>>
>> Noah:
>>>
>>> sub exiting {
>>> my ($hostname, %login) = @_;
>>
>> Passing arguments like this has no such problem.
>> But you'd better pass the hash as a reference to the subroutine.
>>
>> exitint($hostname, \%login);
>>
>> sub exiting {
>>
25 matches
Mail list logo