From: "TapasranjanMohapatra" <[EMAIL PROTECTED]> > All, > Can somebody let me know what is the Perl equivalent of scanf in C. Is > it String::Scanf or there are some other options by which we can take > key board input. Thank You. Tapas
We usualy read a line of input by $line = <STDIN>; remove the newline with chomp($line) and parse it using regexps: my ($id, $name) = ($line =~ /ID: (\d+), Name: ([^,]+)/); The chomp() step is often not necessary. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>