On 3/14/07, Chas Owens <[EMAIL PROTECTED]> wrote:
On 3/14/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote:
snip
> Now how do i come up with the pack template? I dont know how a enum
should
> be represented in the pack template. :-(
>
> /I8(enum)I8i8I8/ => pack template
>
> The above mentioned en
On 3/14/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote:
snip
Now how do i come up with the pack template? I dont know how a enum should
be represented in the pack template. :-(
/I8(enum)I8i8I8/ => pack template
The above mentioned enum just contains two elements.
The data which i need to pack
On 3/13/07, Tom Phoenix <[EMAIL PROTECTED]> wrote:
On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote:
> I was going thro the topic "Accessing packed data structures" in the
Perl
> Complete Reference Book. I came across this example:
>
> struct utmp {
> char ut_user[8]; /* User login name
On 3/13/07, Paul <[EMAIL PROTECTED]> wrote:
On Tue, March 13, 2007 2:38 am, yitzle wrote:
> Where you doing "rm -f $file" or `rm -f $file`?
> You need to use "backticks" for system commands.
If memory serves me, back ticks are only needed inside a system command
for UNIX commands and regular tic
On 03/13/2007 07:44 PM, Hardly Armchair wrote:
Hello List,
I have a data structure containing a bunch of strings in different groups:
[...]
I want these sorted first alphabetically within the group, and then
according to the number of member in the group.
[...]
This is slightly more compact
Hardly Armchair wrote:
> Hello List,
Hello,
> I have a data structure containing a bunch of strings in different groups:
>
> $groups = [
> [
> 'SSPDQR',
> 'SSPSDR',
> 'STSSER',
> ],
> [
> 'CSANLH',
>
Hello List,
I have a data structure containing a bunch of strings in different groups:
$groups = [
[
'SSPDQR',
'SSPSDR',
'STSSER',
],
[
'CSANLH',
'CVANRD',
],
[...],
On Tue, March 13, 2007 2:38 am, yitzle wrote:
> Where you doing "rm -f $file" or `rm -f $file`?
> You need to use "backticks" for system commands.
If memory serves me, back ticks are only needed inside a system command
for UNIX commands and regular ticks specifying the system command within
the Pe
"Shawn Milo" schreef:
> If I pipe the output of the file to "od -c" on the command line, the
> other control characters (which are already correct in the file) seem
> to come through as their octal value. However, most attempts to
> convert the \n into a ^J seem to end up with Perl interpreting i
Jeff Pang schreef:
> perl -e 'print while(<>)' < /etc/passwd
That (is not an answer to OP's question, but) can also be written as:
perl -pe1 /etc/passwd
and even as
cat /etc/passwd
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
Tom Phoenix wrote:
> On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote:
>
>> I was going thro the topic "Accessing packed data structures" in the Perl
>> Complete Reference Book. I came across this example:
>>
>> struct utmp {
>> char ut_user[8]; /* User login name */
>> char ut_id[4]; /* /e
oh - forgot to also request: could you include your reasons why you
might recommend a specific path? Helps me evaluate which learning
path is right for me.
thanks again,
Jen
Jeni Zundel wrote:
I've been attempting to learn perl for about a month so far. I've
taken the 4th Edition of L
I've been attempting to learn perl for about a month so far. I've
taken the 4th Edition of Learning Perl and I work through a chapter
every few days. I just found an online resource at perl.org called
Beginning Perl. I've used a few chapters out of this book; it's
interesting to see the
Chas Owens wrote:
On 3/13/07, Shawn Milo <[EMAIL PROTECTED]> wrote:
How can I get Perl to spit out control characters, such as ^J (the
linefeed) as the actual control character? Every time I try to print
it, Perl converts it to the ASCII \n character.
I need to process a file, converting a \n
Grant wrote:
>> > In this instance I have two blank lines in the delivered HTML
between
>> > htmltag1 and htmltag2:
>> >
>> >
>> > [ictag][/ictag]
>> > [ictag][/ictag]
>> >
>> >
>> > If I use the filter like this:
>> >
>> > [filter no_white]
>> > [ictag][/ictag]
>> > [ictag][/ictag]
>> > [/fil
On 3/13/07, Bill Jones <[EMAIL PROTECTED]> wrote:
snip
In answer to your question, for example under VIM, the ^@ the other
poster is seeing is actually \n (which is what the OP wants) -- but I
am in my own Universe =)
So, when I hit ^V^J VIM displays ^@
snip
That must be an artifact of Vim
Hi All.
I'm trying to either strip everything outside the tags or match
everything inside them for three nearly identical web pages. I need the
content of the pages minus header/footer.
Ultimately I need to glue them all together into one valid html doc but
that's for later.
In general, should
> > while( ) {
> > push @out, $_ if /\S/;
> > }
snip
> Is that better than:
>
> push @out, $_ unless /^\s*$/;
snip
They are functionally equivalent, but (at least on the version of perl
I have) /\S/ is faster:
Ok, I'll switch. Thanks.
- Grant
--
To unsubscribe, e-mail: [EMAIL PROTEC
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
you could also give this a try:
http://search.cpan.org/~rgiersig/Expect-1.20/Expect.pod
On Mar 13, 2007, at 5:41 AM, Nath, Alok (STSD) wrote:
Hi,
I have a perl script which prompts user for certain inputs.
I want to automate this by creating
On 3/13/07, Grant <[EMAIL PROTECTED]> wrote:
snip
> while( ) {
> push @out, $_ if /\S/;
> }
snip
Is that better than:
push @out, $_ unless /^\s*$/;
snip
They are functionally equivalent, but (at least on the version of perl
I have) /\S/ is faster:
mix:
Rate /^\s*$//\S/
>> > In this instance I have two blank lines in the delivered HTML between
>> > htmltag1 and htmltag2:
>> >
>> >
>> > [ictag][/ictag]
>> > [ictag][/ictag]
>> >
>> >
>> > If I use the filter like this:
>> >
>> > [filter no_white]
>> > [ictag][/ictag]
>> > [ictag][/ictag]
>> > [/filter]
>> >
>> >
Grant wrote:
> In this instance I have two blank lines in the delivered HTML between
> htmltag1 and htmltag2:
>
>
> [ictag][/ictag]
> [ictag][/ictag]
>
>
> If I use the filter like this:
>
> [filter no_white]
> [ictag][/ictag]
> [ictag][/ictag]
> [/filter]
>
> I get only one blank line, so it i
> while( ) {
> push @out, $_;
> }
> Can anyone show me how to regexp the blank lines out
> considering the above code?
Do you mean this?
while () {
push @out, $_ unless /^\s*$/;
}
Or, what do you really mean by "blank"?
Hope this helps!
Help? Well, it completely fixed the pro
On 3/13/07, Bill Jones <[EMAIL PROTECTED]> wrote:
000005000
002
000 \0 \n
002
Erm, make that:
od -b xxx is -
000 000 012
002
--
WC (Bill) Jones -- http://youve-reached-the.endoftheinternet.org/
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x2A46CF
On 3/13/07, Rob Dixon <[EMAIL PROTECTED]> wrote:
Unless I'm in a different parallel universe this doesn't make sense at all!
What tests have you done Bill?
How is ^@ (a null or zero byte) equal to "\n"?
How is control-J two bytes? I thought it was pretty much defined as the
character consisti
On 3/13/07, Dharshana Eswaran <[EMAIL PROTECTED]> wrote:
I was going thro the topic "Accessing packed data structures" in the Perl
Complete Reference Book. I came across this example:
struct utmp {
char ut_user[8]; /* User login name */
char ut_id[4]; /* /etc/inittab id */
char ut_line[12]; /*
On 3/13/07, Grant <[EMAIL PROTECTED]> wrote:
while( ) {
push @out, $_;
}
Can anyone show me how to regexp the blank lines out
considering the above code?
Do you mean this?
while () {
push @out, $_ unless /^\s*$/;
}
Or, what do you really mean by "blank"?
Hope this helps!
--To
> In this instance I have two blank lines in the delivered HTML between
> htmltag1 and htmltag2:
>
>
> [ictag][/ictag]
> [ictag][/ictag]
>
>
> If I use the filter like this:
>
> [filter no_white]
> [ictag][/ictag]
> [ictag][/ictag]
> [/filter]
>
> I get only one blank line, so it is an improveme
On 3/12/07, Grant <[EMAIL PROTECTED]> wrote:
snip
In this instance I have two blank lines in the delivered HTML between
htmltag1 and htmltag2:
[ictag][/ictag]
[ictag][/ictag]
If I use the filter like this:
[filter no_white]
[ictag][/ictag]
[ictag][/ictag]
[/filter]
I get only one blank line
Shawn Milo wrote:
On 3/13/07, Bill Jones <[EMAIL PROTECTED]> wrote:
My tests all show that ^@ is not null but the \n you want.
Control-J is two bytes: \0 \n
Under C the \0\n is a End-Of-String indicator -- required to
differentiate it from numbers, etc.
HTH/Sx =)
--
WC (Bill) Jones -- htt
On 3/13/07, Shawn Milo <[EMAIL PROTECTED]> wrote:
How can I get Perl to spit out control characters, such as ^J (the
linefeed) as the actual control character? Every time I try to print
it, Perl converts it to the ASCII \n character.
I need to process a file, converting a \n to \cJ, AKA the ^J
Shawn Milo wrote:
How can I get Perl to spit out control characters, such as ^J (the
linefeed) as the actual control character? Every time I try to print
it, Perl converts it to the ASCII \n character.
I need to process a file, converting a \n to \cJ, AKA the ^J
character. I've tried various th
On 3/13/07, Bill Jones <[EMAIL PROTECTED]> wrote:
My tests all show that ^@ is not null but the \n you want.
Control-J is two bytes: \0 \n
Under C the \0\n is a End-Of-String indicator -- required to
differentiate it from numbers, etc.
HTH/Sx =)
--
WC (Bill) Jones -- http://youve-reached-t
On 3/13/07, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote:
Hi,
I have a perl script which prompts user for certain inputs.
I want to automate this by creating a separate script which runs the
above perl file and probably passing the inputs in a separate text
file.
Can anybody give me s
How can I get Perl to spit out control characters, such as ^J (the
linefeed) as the actual control character? Every time I try to print
it, Perl converts it to the ASCII \n character.
I need to process a file, converting a \n to \cJ, AKA the ^J
character. I've tried various things with sprintf,
How about this thought?
perl -e 'print while(<>)' < /etc/passwd
This would print the content in /etc/passwd file.
Here I just use shell's "<" symbol to pass the file's content to perl script.
-Original Message-
>From: "Nath, Alok (STSD)" <[EMAIL PROTECTED]>
>Sent: Mar 13, 2007 8:41 PM
Jenda and Chas, thank you both for your suggestions. I thought that it
might involve both LWP and XML modules, but I thought it would be much
more complicated than either of your suggestions. Thank you for teaching
me the simplicity of these operations.
-Kevin
-Original Message-
From: Jen
Grant wrote:
>> $val =~ s/^\s*\n//mg;
>
> I'm not having any luck there either. I'm not sure what is actually
> creating the blank lines. It could be spaces, tabs, or some other
> blank line creator.
The \s marker will match all of those. Can you show us your code please?
Don't forget that y
Hi,
I have a perl script which prompts user for certain inputs.
I want to automate this by creating a separate script which runs the
above perl file and probably passing the inputs in a separate text
file.
Can anybody give me some pointers or how to do this ?
Thanks
Alok.
--
To
On Tue, 2007-03-13 at 02:29 -0400, Mathew wrote:
> I recently forgot about the unlink function and had been trying to
> remove files using the less efficient system call to run "rm -f
> /path/to/files". I found, however, that this didn't work at all.
>
> I've since replaced it with unlink and get
Hi all,
I was going thro the topic "Accessing packed data structures" in the Perl
Complete Reference Book. I came across this example:
struct utmp {
char ut_user[8]; /* User login name */
char ut_id[4]; /* /etc/inittab id */
char ut_line[12]; /* device name */
short ut_pid; /* process ID */
shor
Hello,
1. Check that the "rm" command is not mapped to "rm -i" or
similar alias.
if so them the "rm -f" command from system() command will not
work.
Thanx
Madan
Mathew wrote:
I recently forgot about the unlink function and had been trying to
remove files using the less effic
42 matches
Mail list logo